Opened 6 years ago

Closed 5 years ago

#3838 enhancement closed invalid (invalid)

Add setuptools egg info to provide more svn details

Reported by: thijs Owned by:
Priority: normal Milestone:
Component: release management Keywords:
Cc: thijs, exarkun, glyph, radix Branch:
Author: Launchpad Bug:

Description

The version number is currently out of date, it's still in the 2008 range and pointed to 8.2, although we're almost 6 months into 2009. At the time of the 8.2 release it didn't make sense to up the version number to 9, since it was still 2008, but it should've been changed to 8.3 or something, because python setup.py install shows the same version number for the released 8.2 as the current trunk:

$ python
Python 2.5.1 (r251:54863, Jan 13 2009, 10:26:13) 
[GCC 4.0.1 (Apple Inc. build 5465)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import twisted; twisted
<module 'twisted' from 'twisted/__init__.pyc'>
>>> twisted.version
Version('twisted', 8, 2, 0)
>>>

After the version number update landed in the trunk. the version numbers present on the site also need to be updated, like the name of the Twisted-8.2+1 milestone.

There aren't any documents that describe a proper release procedure as far as I know, except for this old page, so would be good to have something like a release policy document describing things like how and when bump the version number. But that will get a separate ticket.

Attachments (2)

version.patch (351 bytes) - added by thijs 6 years ago.
and of course something trivial helps me distinguish the trunk from the released version atm
egg_info.patch (237 bytes) - added by thijs 6 years ago.

Download all attachments as: .zip

Change History (16)

comment:1 follow-up: Changed 6 years ago by exarkun

  • Owner changed from glyph to radix

I think this is a release procedure documentation issue.

The major.minor.micro version number is associated with releases. It can't ever be correct or unambiguous between releases. For that, the major.minor.micro+revision format is required. If you use Twisted from an svn checkout, then you'll get this. If you install an svn checkout, then I suppose you'll lose that information.

comment:2 in reply to: ↑ 1 Changed 6 years ago by thijs

  • Priority changed from normal to high

Replying to exarkun:

I think this is a release procedure documentation issue.

I opened #3839 for such a document, but it still means the version number has to be updated atm, raising the priority of the ticket, even though it's trivial to do.

comment:3 Changed 6 years ago by thijs

  • Milestone changed from Twisted-8.2+1 to regular-releases

Also seems this belongs in the regular-releases milestone.

Changed 6 years ago by thijs

and of course something trivial helps me distinguish the trunk from the released version atm

comment:4 Changed 6 years ago by exarkun

No, I don't think it means that. Current trunk is not 9.0.0. It's not 8.2.0 either, but that's how we decided to do things.

comment:5 follow-up: Changed 6 years ago by glyph

  • Cc glyph added

I agree with exarkun. Current trunk is not 9.0. Changing the version number to 9.0 right now would be worse than leaving it at 8.2, since at least under the current regime, if someone says 8.2 we know it means "8.2 or, possibly, later". If we change it at some random point, then "9.0" will mean "9.0, or, possibly, later, or, possibly, earlier".

thijs, if you want to make it easier to precisely identify an SVN revision, there are a bunch of things I could imagine doing. Here are some ideas:

  1. Make it possible to identify different branches in the revision. Right now, if you get an SVN revision, you don't know what branch it came from, which is often more important than the specific revision.
  2. Add some version-identification metadata during the installation process so that if users install from an SVN checkout, they still get the SVN revision (and possibly branch, as per point 1) reliably when looking at the short() version number.
  3. Update the documentation for base() to make it clear that nothing but the release machinery should call it.

I'm tempted to just say that this ticket is "wontfix" since it will be done as part of the 9.0 release. There might be a release documentation issue, though; I'd rather just close this and open a new one, though - tickets are cheap, no reason to repurpose them.

If we are in agreement that the current policy needs new documentation, then this might be of some use to someone writing such documentation: http://labs.twistedmatrix.com/2007/12/future-of-twisted-releases.html

Changed 6 years ago by thijs

comment:6 Changed 6 years ago by thijs

  • Keywords review added
  • Owner radix deleted

I think we need to add a setup.cfg file with some [egg_info], see attached patch.

This forces the {{setup.py install}}} command to install the .egg as:

Finished processing dependencies for Twisted==8.2.0dev-r26936

Instead of:

Finished processing dependencies for Twisted==8.2.0

comment:7 in reply to: ↑ 5 Changed 6 years ago by thijs

  • Summary changed from Update version number for 2009 to Add setuptools egg info to provide more svn details

Replying to glyph:

  1. Make it possible to identify different branches in the revision. Right now, if you get an SVN revision, you don't know what branch it came from, which is often more important than the specific revision.
  2. Add some version-identification metadata during the installation process so that if users install from an SVN checkout, they still get the SVN revision (and possibly branch, as per point 1) reliably when looking at the short() version number.
  3. Update the documentation for base() to make it clear that nothing but the release machinery should call it.

The attached patch adds the word 'dev' and the svn revision number to the name of the egg, but that doesn't solve the problem of identifying different branches. I'm wondering if something like Combinator should update the setup.cfg file, and replace the tag_build = dev with something like tag_build = branch-name-123?

If we are in agreement that the current policy needs new documentation, then this might be of some use to someone writing such documentation: http://labs.twistedmatrix.com/2007/12/future-of-twisted-releases.html

Thanks, I'll reference that url in the related ticket #3839 for that new documentation.

I'm renaming the ticket since it won't be updated to a 2009 version nr, but tries to add some setuptools metadata.

comment:8 Changed 6 years ago by glyph

  • Cc radix added
  • Keywords review removed
  • Owner set to thijs
  1. There are no tests for this.
  2. Why would anyone care about egg metadata?
  3. The egg metadata isn't used by twisted.python.versions, so e.g. "twistd --version" and "trial --version" will not include this information.
  4. It seems like this would screw up the release process; without additional automation from the release tools, the attached setup.cfg would cause all releases to be tagged 'dev' and include the SVN revision, unless it were hand-patched as part of the release process. I think that's moving in the opposite direction than we want to.

I'm adding radix to the list here so he can weigh in if I misrepresent the release process.

comment:9 Changed 6 years ago by exarkun

I'm confused. When I run setup.py install from an svn checkout, the last line of output is this:

Finished processing dependencies for Twisted==8.2.0-r26894

How did you end up with an egg without the extra revision information?

Also, for what it's worth, it's not necessary to patch Twisted to effect the change that the given setup.cfg would provide. This has the same consequences:

python setup.py egg_info --tag-build=dev --tag-svn-revision

Though when I do this, since I already get revision information in the version, it gets doubled to:

Finished processing dependencies for Twisted==8.2.0-r26940dev-r26929

comment:10 Changed 5 years ago by glyph

  • Type changed from defect to enhancement

I don't think this is a bug; it's a request for additional information, so I'm marking it as an enhancement. Also I don't see any particular urgency, so I'm putting it back at 'normal' where most of the other regular-releases stuff is.

comment:11 Changed 5 years ago by glyph

  • Priority changed from high to normal

comment:12 Changed 5 years ago by exarkun

  • Component changed from core to release management
  • Milestone regular-releases deleted

Adjusting metadata to reflect what this ticket might be about slightly better.

comment:13 Changed 5 years ago by exarkun

  • Resolution set to invalid
  • Status changed from new to closed

Since I think this information is available already, closing. Re-open if I misunderstand.

comment:14 Changed 4 years ago by <automation>

  • Owner thijs deleted
Note: See TracTickets for help on using tickets.