-
-
Notifications
You must be signed in to change notification settings - Fork 18.2k
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
DEPS: require updated python-dateutil, openpyxl #18182
Conversation
cc @neirbowj since you wrote most of the code I just ripped out :> |
👍 It had a good run. I hope folks found it useful. I'm glad to see it retired. And incidentally, no concerns for the FreeBSD port because the applicable dependencies are already at:
|
should we bump openpxl to even newer? |
I'm probably not the right person to answer that question. I'm not an openpyxl user and haven't studied the codebase since the last time I got roped into responding to one of that project's minor updates that broke backwards compatibility. Therefore I cannot say whether a more aggressive version bump would be a good idea, bad idea, or indifferent. From a port maintainer perspective, is there anything you'd like me to investigate? |
i just want to make sure that i didn’t remove any relevant tests (that were not tied to earlier versions) |
That would be non-trivial for me to verify, and I'm afraid can't justify spending time on it at the moment unless the test removal impacts the FreeBSD port. |
Codecov Report
@@ Coverage Diff @@
## master #18182 +/- ##
==========================================
+ Coverage 91.4% 91.55% +0.15%
==========================================
Files 163 162 -1
Lines 50064 49947 -117
==========================================
- Hits 45759 45730 -29
+ Misses 4305 4217 -88
Continue to review full report at Codecov.
|
Codecov Report
@@ Coverage Diff @@
## master #18182 +/- ##
==========================================
+ Coverage 91.44% 91.59% +0.14%
==========================================
Files 157 156 -1
Lines 51449 51328 -121
==========================================
- Hits 47048 47013 -35
+ Misses 4401 4315 -86
Continue to review full report at Codecov.
|
8d28316
to
034528a
Compare
My suggestion would be to go with >= 2.4.0 as this includes utilities and styles for working with Pandas dataframes which should make integration code a lot easier and reliable. NB. Merged cells are still a problem but openpyxl 2.5 introduces something that, in time, will make these easier to work with. 2.4 also gives you the Would be happy to discuss this with anyone but haven't time to do it myself at the moment. 2.4 is stable and I haven't seen anything 2.3 specific issues for a good long time. |
@Themanwithoutaplan thanks for the suggestion. |
http://openpyxl.readthedocs.io/en/default/pandas.html explains everything (based on the work we did together in Montreal). |
Also, support for a dedicated datetime celltype is coming 2.5. Removes some of the problems associated with Excel's moronic handling of dates and times. |
@Themanwithoutaplan is this api supported in >= 2.4? (would you do a PR to change the pandas code)? |
New datetimes are 2.5 only. Not sure when I can do a PR. We are having a sprint here in Düsseldorf next week but I was hoping to be able work on something else… I would like to get 2.5 out the door. It's just missing the code for adding/removing rows and columns. |
any comments @jorisvandenbossche @TomAugspurger |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For openpyxl, it seems all code you removed was for versions < 2.2. Is there a reason to not just bump the minimum required to 2.2 instead of directly 2.4 in the PR?
For dateutil, do we win (code cleanup wise) a lot by not leaving the minimum version at eg 2.4 ?
Further:
- Can you also update the io.rst docs? (there is a mention of the needed openpyxl version somewhere I think)
Although, by the time 0.22 will be released, dateutil 2.5 will probably be almost 2 years old, so that is probably fine. |
why? that's a pretty old version, I don't see a reason to not require newer things in developing libraries (esp there is a speedup coming), see the above comments. |
openpyxl 2.4 is just 1 year old, which is not that much. If it doesn't cost us anything to provide users the ability to use older version, I would do that (at the moment it is simply the check of the version that would need to be changed no?). If we would start using those newer features, then sure. |
258f5e9
to
b653b47
Compare
doc/source/whatsnew/v0.22.0.txt
Outdated
| openpyxl | 2.4.0 | | | ||
+-----------------+-----------------+----------+ | ||
|
||
- :func:`Series.fillna` now raises a ``TypeError`` instead of a ``ValueError`` when passed a list, tuple or DataFrame as a ``value`` (:issue:`18293`) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
merge issue here
Please also update io.rst (there are several mentions of openpyxl and its supported version) What is the advantage of hard dropping support for older pytz versions? It does not cost us anything? (I mean in code complexity)
But we do not use this API at this point? As we only have special cased code for openpyxl < 2.2. If there have been many changes in style, for me that is a reason more to not drop support (as long as we don't use features of the newer releases), if people want to preserve the actual styling they have right now. |
this is true, yeah just wanted to set some sort of minimum, though I guess its not really needed.
not the point, there was too much churn in the < 2.4 versions. |
openpyxl used to have unreliable and incorrect style implementation so backwards-incompatible changes were essential. Not doing users any favours by keeping support for these around, especially as code coverage was never complete I've just managed to update my fork and hope to work on the > 2.4 implementation in the near future. Using the API will make it much easier in future to decide who's responsible.
|
I'm not having a lot of fun getting tests to run: segfault with Python 3.6 on Mac OS and unable to run test_excel.py in isolation. I'd better check the docs. |
I've started work on this. |
Looking at the implementation: is it going to be possible to work directly with a dataframe? openpyxl doesn't need the intermediate |
@Themanwithoutaplan the implementation is orthogonal to us changing versions so i assume this is not possible currently? |
I'm going to look at interfacing directly from |
25594ac
to
38a339e
Compare
After some further investigation It looks to me that the best fit for the modern openpyxl API would be have a drop-in replacement for |
closes #15184
reminder to change: https://github.com/conda-forge/pandas-feedstock on release