yhat / ggpy

ggplot port for python
http://yhat.github.io/ggpy/
BSD 2-Clause "Simplified" License
3.69k stars 573 forks source link

fixing incompatibility with pandas>=0.20.0 #647

Open mschmidtesd opened 6 years ago

mschmidtesd commented 6 years ago

Pandas made some modules private and deprecated: https://pandas.pydata.org/pandas-docs/stable/whatsnew.html#modules-privacy-has-changed The moved Timestamp class is available from top-level namespace.

This patch fixes #617 and #618. I have tested it with pandas back to version v0.17.0 (October 9, 2015) under Python 3.6 . Older versions were not tested as they do not compile on my machine out-of-the-box. Test reports with older versions are appreciated.

waynenilsen commented 6 years ago

The last person merging PRs in this repo back in late 2016 was @glamp. Can you please review this PR for merge. I strongly recommend keeping compatibility with the ecosystem as updates come out. I could see adding a try/catch trying the new way first and going back to the old way if necessary.

A new version should also be pushed to pypi when this is fixed

russklvacek commented 6 years ago

Towards scoping testing: is there any sort of official statement on which pandas versions this should support?

waynenilsen commented 6 years ago

I took a look around and it doesn't seem that there is anything stated anywhere prominent but I imagine python 2.7, 3.4, 3.5, 3.6 with some pandas versions like 0.16 - 0.21 would be a good surface to cover where compatible.

This library is licensed under BSD2 and has not accepted a PR in about 2 years.

We can fork this library and create a maintained version with a new team. Not sure the best way about doing that.. Perhaps create a new org on github and invite some contributors and people that have submitted PRs to this repo? Something like ggpy2?

mschmidtesd commented 6 years ago

I just took a look at the pandas git repo. The commit injecting the Timestamp class into the pandas scope was b50076ec3a9e6c1f326b7ab23b87c50131aa23a7 in April 2012, so my patch should be backwards compatible with pandas versions since and including v0.8. Knowing this I have no idea why the yhat folks used pandas.tslib.Timestamp and pandas.lib.Timestamp in the first place.

Regarding the unresponsiveness of the maintainer team, Yhat has been acquired by Alteryx about a year ago, but Alteryx has been quite silent about that and the former Yhat products.

At least Austin @hernamesbarbara is still active on twitter

waynenilsen commented 6 years ago

Ok @mschmidtesd I have created a new org and invited you to it.

I have merged your PR into master along with several others from this repo

waynenilsen commented 6 years ago

I have discovered plotnine and I have realized the futility of resurrecting ggpy. I am leaving this comment here in an effort to point anyone with the same problem to this library.

JoshRosen commented 5 years ago

Some folks might have legacy applications / codebases which make use of this ggplot library and which can't easily migrate to plotnine, so I'd very much appreciate it if this PR was merged and released as a minor maintenance fix.