home / github / issue_comments

Menu
  • GraphQL API
  • Search all tables

issue_comments: 434899060

This data as json

html_url issue_url id node_id user created_at updated_at author_association body reactions performed_via_github_app issue
https://github.com/pydata/xarray/pull/2516#issuecomment-434899060 https://api.github.com/repos/pydata/xarray/issues/2516 434899060 MDEyOklzc3VlQ29tbWVudDQzNDg5OTA2MA== 6628425 2018-11-01T01:17:06Z 2018-11-01T01:17:06Z MEMBER

Thanks @shoyer -- that was a bit puzzling but I think I sorted it out. I haven't done a careful diagnosis, but my hunch is that the previous build was running into this issue: https://github.com/pytest-dev/pytest/issues/2917. A fix was merged a few weeks ago, but the Python 2.7 32-bit build is/was using a relatively old version of pytest (3.5 versus the most recent 3.9.3).

In the previous build, the FutureWarning for setting the enable_cftimeindex option was being emitted earlier in test_backends.py in the test_open_mfdataset_manyfiles test (before we were watching for it in the options tests). It was being raised there, because upon calling set_options.__exit__, every option (not just the options that were set in a with statement) would be reset to its global value. For example doing something like this would emit the warning (which even outside of this minor testing issue, I think is undesirable): ``` In [1]: import xarray

In [2]: with xarray.set_options(display_width=40): ...: pass ...: /Users/spencerclark/xarray-dev/xarray/xarray/core/options.py:49: FutureWarning: The enable_cftimeindex option is now a no-op and will be removed in a future version of xarray. FutureWarning) `` In 6d08d3b I made changes toset_optionsto only fill theself.olddictionary with the old values for the keyword arguments specified in the constructor, and then had theexit` method only reset the values that were temporarily set before. The win-32 build now passes, and we no longer have the undesirable warning behavior shown above. Do you think that was a reasonable fix?

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  374434077
Powered by Datasette · Queries took 157.124ms · About: xarray-datasette