MIT-LCP / wfdb-python

Native Python WFDB package
MIT License
738 stars 300 forks source link

Support for Pandas 2.0? #446

Closed hoechenberger closed 1 year ago

hoechenberger commented 1 year ago

Hello, currently, Pandas is pinned to version 1.x:

https://github.com/MIT-LCP/wfdb-python/blob/4d4233fba53a96cdb6d2064c4e4ba0131c78944f/pyproject.toml#L16

Meanwhile, Pandas 2.0 has been released, and trying to install it alongside wfdb logically leads to a dependency conflict.

I wanted to ask if wfdb is supposed to not work with Pandas 2.0 now or if the version pinning is unnecessarily restrictive and could be relaxed to include Pandas 2.0 as well?

Thanks, Richard

cbrnr commented 1 year ago

I ran the tests with pandas 2.0.0 and they all pass. Please let me know if you would like me to submit a PR.

FWIW, capping dependencies are usually not ideal, so if possible please consider removing all upper bounds from your dependencies (see e.g. https://iscinumpy.dev/post/bound-version-constraints/#tldr for an explanation).

tompollard commented 1 year ago

Thanks for looking at this @cbrnr.

Please let me know if you would like me to submit a PR.

Yes, please, I'd appreciate it. Thanks!

FWIW, capping dependencies are usually not ideal, so if possible please consider removing all upper bounds from your dependencies (see e.g. https://iscinumpy.dev/post/bound-version-constraints/#tldr for an explanation).

I hadn't realised that the ^ was adding an upper bound, but I now see that it is. I don't think there's any reason why we want to be fixing ourselves on these old versions (certainly not for pandas, at least).

@bemoody any reasons why we shouldn't remove all of the upper bounds in pyproject.toml as suggested? Seems like a good idea to me. @cbrnr if you have time, please also feel free to open a (separate) PR for this.

cbrnr commented 1 year ago

Great! See #447 and #448.

hoechenberger commented 1 year ago

Great! @tompollard Any chance of tagging a new release with this change?

tompollard commented 1 year ago

@hoechenberger sure, we'll do this shortly. @bemoody has been managing the updates recently. Benjamin, okay with making a new release? Let me know if you'd like me to take care of it. It would be good if we could merge https://github.com/MIT-LCP/wfdb-python/pull/448 beforehand too.

tompollard commented 1 year ago

@hoechenberger Done! See: https://pypi.org/project/wfdb/4.1.1/

pip install wfdb --upgrade should bump you to the latest version.

hoechenberger commented 1 year ago

Thank you!