2.6.0 stopped supporting freezegun for pandas dataframe to_excel export

Issue #1179 closed
George van Rooyen created an issue

I've been using the package freezegun (https://github.com/spulec/freezegun) for testing, and it works up to the latest 2.5 version of openpyxl, but it's failing for 2.6.0. It looks like there might have been a change in the is_date_format function that caused this.

The screenshot below is from a test that uses the freeze_time decorator before the test, like so:

@freeze_time("2016-10-30 12:00:01")
def test_...

openpyxl stacktrace.png

Comments (5)

  1. George van Rooyen reporter

    I realise this might be an edge case that openpyxl doesn't want to support, I'm just reporting it in case it can be easily addressed :)

  2. CharlieC

    We don't track downstream libraries but we do provide betas for their developers to track openpyxl. is_date_format itself hasn't changed.

    While I understand the convenience of to_excel, I don't like its dependency on library internals. We provide the utility function dataframe_to_rows as a proper API, though I think this may struggle with multiindex headers, because of missing API there on expanding these.

    No ideas what a FakeDate is or how it's supposed to work, we support Python's datetime types and Numpy's.

  3. George van Rooyen reporter

    Understood, thanks! Happy if you want to change this to Closed or Wontfix - I'll see if there's a way to work this into the downstream libraries.

  4. Log in to comment