question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Should we deprecate the compat and encoding constructor arguments?

See original GitHub issue

In https://github.com/pydata/xarray/pull/1170#discussion_r94078121, @shoyer writes:

…I would consider deprecating the encoding argument to DataArray instead. It would also make sense to get rid of the compat argument to Dataset.

These extra arguments are not part of the fundamental xarray data model and thus are a little distracting, especially to new users.

@pydata/xarray and others, what do we think about deprecating the compat argument to the Dataset constructor and the encoding arguement to the DataArray (and Dataset via #1170).

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
fmaussioncommented, Dec 28, 2016

I don’t have an opinion on compat (seems somehow unrelated to netCDF and https://github.com/pydata/xarray/issues/1170?), but I am +1 on encode. I always use encode when writing a dataset to disk, not at construction.

0reactions
shoyercommented, Jan 24, 2019

We still have compat as an argument to Dataset.__ini__.

I think we should probably deprecate it. I’ve never used it, and if you really want that high a level of control you can easily substitute using merge() instead.

Read more comments on GitHub >

github_iconTop Results From Across the Web

How and When to Deprecate APIs
Deprecation is a reasonable choice in all these cases because it preserves "backward compatibility" while encouraging developers to change to the new API....
Read more >
Solidity v0.5.0 Breaking Changes
Calling a constructor with arguments but with wrong argument count is now disallowed. If you only want to specify an inheritance relation without...
Read more >
The @Deprecated Annotation in Java
The @Deprecated annotation tells the compiler that a method, class, or field is deprecated and that it should generate a warning if someone ......
Read more >
ABI-Encoded Constructor Arguments
If Constructor Arguments are required by the contract, you will add them to the Constructor Arguments field in ABI hex encoded form. Constructor...
Read more >
Deprecated and obsolete features - JavaScript - MDN Web Docs
This page lists features of JavaScript that are deprecated (that is, ... you should use the arguments object inside function closures.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found