Skip to content

Configuration warnings with clean 0.3.2 -> 0.4 upgrade - #2772

Merged
mdboom merged 5 commits into
astropy:masterfrom
mdboom:config/issue-2772
Jul 25, 2014
Merged

mdboom merged 5 commits into
astropy:masterfrom
mdboom:config/issue-2772

Conversation

@mdboom

@mdboom mdboom commented Jul 21, 2014

Copy link
Copy Markdown
Contributor

To reproduce:

  • start with clean Python install, no .astropy folder in home directory
  • install astropy 0.3.2 with e.g. conda install astropy=0.3.2
  • install astropy 0.4 with e.g. conda install astropy=0.4
  • start up python, then from astropy.io import fits, gives:
WARNING: ConfigurationChangedWarning: The configuration options in astropy 0.4 may have changed, your configuration file was not updated in order to preserve local changes.  A new configuration template has been saved to '/Users/tom/.astropy/config/astropy.0.4.cfg'. [astropy.config.configuration]

I've also seen the same error as this person is reporting:

http://stackoverflow.com/questions/24852262/astropy-deprecation-warning

with a slightly different upgrade path (can't remember exactly how!) on a machine on which I had not edited astropy.cfg. To repeat their error:

WARNING: AstropyDeprecationWarning: Config parameter 'enabled_record_valued_keyword_cards' in section [io.fits] of the file 'C:\Users\nandhos.astropy\config\astropy.cfg' is deprecated. Use 'enable_record_valued_keyword_cards' in section [fits] instead. [astropy.config.configuration]

Might the two be related?

cc @mdboom

@astrofrog astrofrog added this to the v0.4.1 milestone Jul 20, 2014
@astrofrog astrofrog changed the title ConfigurationChangedWarning warning with clean 0.3.2 -> 0.4 upgrade Configuration warnings with clean 0.3.2 -> 0.4 upgrade Jul 20, 2014
@mdboom

mdboom commented Jul 21, 2014

Copy link
Copy Markdown
Contributor

So, this is kind of a mess. The generated astropy.cfg on 0.3.2 contains a path to to jquery that is generated at build time -- and it points to a file in the working directory not the install directory. git blame tells me it's my fault, so I have only myself to blame... I think what happened here is that the jquery_url stuff was added to 0.3.2 after the configuration work was done on 0.4, and the two never got reconciled.

So that means that comparing the configuration file for a known past state from astropy 0.3.2 will always fail unless you are running on my machine with exactly my directory structure. 0.3.1 does not have this problem (since it has no jquery_url config option), nor does 0.4.0 (where we start using commented out configuration settings anyway).

The conda recipe further seems to patch the config file to point to the install directory (very good thing, but I wish that had been reported upstream). Does anyone know where the anaconda recipes are available for viewing? conda/conda-recipes only contains a very out-of-date recipe for astropy 0.2.5. The conda recipe for 0.4 shouldn't need to do this, and I'd like to confirm.

The second issue could certainly be related to the first. That warning certainly would appear with a stock astropy 0.3.x config file if the detection that it was unedited failed.

@embray

embray commented Jul 21, 2014

Copy link
Copy Markdown
Member

Yuck. It'll be great when we're over this hump with the config system :)

@embray

embray commented Jul 23, 2014

Copy link
Copy Markdown
Member

I guess this is good to merge?

I want to release 0.4.1 today so that I can stop hearing about #2749.

@taldcroft

Copy link
Copy Markdown
Member

On the point of where you can see Anaconda recipes, for packages that I have built myself and put on binstar, the recipe is easily available in the installed environment as $CONDA_ROOT/pkgs/<package_name>/info/recipe/. But this recipe directory is not in the packages installed from the official defaults channel provided by Continuum. I'm not sure why that is the case.

@mdboom

mdboom commented Jul 25, 2014

Copy link
Copy Markdown
Contributor

Yeah, I think this is ready.

mdboom added a commit that referenced this pull request Jul 25, 2014
Configuration warnings with clean 0.3.2 -> 0.4 upgrade
@mdboom
mdboom merged commit 8f3dd32 into astropy:master Jul 25, 2014
mdboom added a commit that referenced this pull request Aug 6, 2014
Configuration warnings with clean 0.3.2 -> 0.4 upgrade
@mdboom
mdboom deleted the config/issue-2772 branch March 3, 2015 16:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants