{"action":"created","issue":{"url":"https://api.github.com/repos/astropy/astropy-helpers/issues/133","labels_url":"https://api.github.com/repos/astropy/astropy-helpers/issues/133/labels{/name}","comments_url":"https://api.github.com/repos/astropy/astropy-helpers/issues/133/comments","events_url":"https://api.github.com/repos/astropy/astropy-helpers/issues/133/events","html_url":"https://github.com/astropy/astropy-helpers/issues/133","id":55852184,"number":133,"title":"Fix warnings in setuptools 8.0","user":{"login":"embray","id":676149,"avatar_url":"https://avatars.githubusercontent.com/u/676149?v=3","gravatar_id":"","url":"https://api.github.com/users/embray","html_url":"https://github.com/embray","followers_url":"https://api.github.com/users/embray/followers","following_url":"https://api.github.com/users/embray/following{/other_user}","gists_url":"https://api.github.com/users/embray/gists{/gist_id}","starred_url":"https://api.github.com/users/embray/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/embray/subscriptions","organizations_url":"https://api.github.com/users/embray/orgs","repos_url":"https://api.github.com/users/embray/repos","events_url":"https://api.github.com/users/embray/events{/privacy}","received_events_url":"https://api.github.com/users/embray/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/astropy/astropy-helpers/labels/bug","name":"bug","color":"fc2929"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2015-01-29T03:36:57Z","updated_at":"2015-02-10T00:01:31Z","closed_at":null,"body":"As of setuptools 8.0, which introduced some new version parsing and full support for PEP 440, we get a couple warnings when running setup.py:\r\n\r\n```\r\n    /home/iguananaut/.virtualenvs/tmp-dea251bdca0911e7/local/lib/python2.7/site-packages/pkg_resources/__init__.py:186: RuntimeWarning: You have iterated over the result of pkg_resources.parse_version. This is a legacy behavior which is inconsistent with the new version class introduced in setuptools 8.0. That class should be used directly instead of attempting to iterate over the result.\r\n      stacklevel=1,\r\n    /home/iguananaut/.virtualenvs/tmp-dea251bdca0911e7/local/lib/python2.7/site-packages/setuptools/dist.py:284: UserWarning: The version specified requires normalization, consider using '1.1.dev0' instead of '1.1.dev'.\r\n      self.metadata.version,\r\n```\r\n\r\nI'm not sure what the first one is aobout, I'm sure we can figure it out.  The second one is because we use \"dev\" version numbers like \"1.1.dev\".  But if I understand correctly (and I need to double check this) PEP-440 requires that dev versions have some unique specifier following it and can't just be bare.  We already generate a 'revision' number that we attach (like 1.1.dev1234) based on a count of git changesets.  But this count (unlike the githash) does not get stored in version.py for use in source dists of dev versions.  So that should be fixed as well."},"comment":{"url":"https://api.github.com/repos/astropy/astropy-helpers/issues/comments/73618009","html_url":"https://github.com/astropy/astropy-helpers/issues/133#issuecomment-73618009","issue_url":"https://api.github.com/repos/astropy/astropy-helpers/issues/133","id":73618009,"user":{"login":"embray","id":676149,"avatar_url":"https://avatars.githubusercontent.com/u/676149?v=3","gravatar_id":"","url":"https://api.github.com/users/embray","html_url":"https://github.com/embray","followers_url":"https://api.github.com/users/embray/followers","following_url":"https://api.github.com/users/embray/following{/other_user}","gists_url":"https://api.github.com/users/embray/gists{/gist_id}","starred_url":"https://api.github.com/users/embray/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/embray/subscriptions","organizations_url":"https://api.github.com/users/embray/orgs","repos_url":"https://api.github.com/users/embray/repos","events_url":"https://api.github.com/users/embray/events{/privacy}","received_events_url":"https://api.github.com/users/embray/received_events","type":"User","site_admin":false},"created_at":"2015-02-10T00:01:31Z","updated_at":"2015-02-10T00:01:31Z","body":"Ah, the issue is a little more subtle than I thought.  Of course, the revcount *is* saved in version.py in the form of the _last_generated_version variable.  But it seems that when I run `./setup.py` from within an unpacked source tarball it still ends up overwriting version.py and removing that information, so that's no good.  Need to investigate why that is happening.  I think maybe for source tarballs there should be a much simplified `version.py` that only contains constants and no code to update them.  I think I kind of started taking things in that direction with c7c102898189ef5781aa5c933a848afb333110fe, but never took it all the way."}}