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.

Clobber & Overwrite?

See original GitHub issue

Astropy 1.3 spews deprecation warnings when using clobber now. I’m happy to shift from clobber->overwrite but I have codes that need to maintain compatibility with astropy 1.0+, and I don’t want these to throw deprecation warnings everywhere. Is it possible to backport the overwrite change so that all versions of astropy 1.* support both (with deprecation warnings)? (this is really a policy question regarding minor version changes; I’m sure it’s technically possible)

Issue Analytics

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

github_iconTop GitHub Comments

7reactions
astrofrogcommented, Jan 3, 2017

So what about just removing the deprecation warning in 1.3.1 and re-introducing it in 2.0 LTS?

1reaction
jehturnercommented, Mar 1, 2017

Just FWIW, if other people are struggling with wrappers etc., I dealt with the change like this (in __init__.py), which also works with the writeto method:

if 'clobber' in inspect.getargspec(astropy.io.fits.writeto).args:
    arg_overwrite = 'clobber'
else:
    arg_overwrite = 'overwrite'

and

from . import arg_overwrite

hdulist.writeto(filename, **{arg_overwrite : overwrite})

While I certainly wouldn’t want to get stuck with a bad API in the name of backwards compatibility, we (Gemini) also find this kind of change a bit disruptive for only cosmetic reasons (more or less)… 😉.

Read more comments on GitHub >

github_iconTop Results From Across the Web

2.22. Clobbering a File on Purpose - bash Cookbook [Book]
Even if noclobber is set, bash ignores its setting and overwrites the file. Consider this example: $ echo something > my.file $ set...
Read more >
Clobbering - Wikipedia
To overwrite, usually unintentionally: "I walked off the end of the array and clobbered the stack." Compare mung, scribble, trash, and smash the...
Read more >
To clobber or to noclobber? - Victor Dodon
In the context of a command line interpreter, clobbering means overwriting the contents of a file using shell redirection (using the > and...
Read more >
Configure workspace options
[no]clobber. Specifies whether p4 sync overwrites writable but unopened workspace files. (By default, Helix Server does not overwrite unopened files if they ...
Read more >
clobber - Catb.org
clobber : vt. To overwrite, usually unintentionally: “I walked off the end of the array and clobbered the stack.” Compare mung, scribble, trash, ......
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