Opened 8 years ago

Closed 8 years ago

#248 closed defect (fixed)

version string (in tarball) is unicode, breaks tests

Reported by: Brian Warner Owned by:
Priority: major Milestone: 0.10.1
Component: packaging Version: 0.9.1
Keywords: Cc:

Description

vu3rdd noticed (in https://github.com/warner/foolscap/pull/24) that recent Versioneer causes our version string to be a unicode object (instead of a bytestring) when building from a tarball, and that this breaks some tests (test_logging.Publish.test_logpublisher) because the RILogPublisher.get_versions constraint insists upon bytestring values.

There's actually a deeper question here, involving Versioneer and whether project version strings should be bytestrings or unicode (consider that the project name itself might require unicode to be expressed correctly, hence the git tag might be unicode, from which the version string is derived).

But for now, the sensible fix is to apply vu3rdd's patch and just cast __version__ to a str.

I added a new explicit test for this in [1f42becb].

Change History (3)

comment:1 Changed 8 years ago by Brian Warner

Landed the patch (rebased) in [26b86a20]. Thanks!

comment:2 Changed 8 years ago by Brian Warner

.. and it needed a second patch, in [643ba9e4b4] and [bfcc0b1625], since for some reason I grab the version string in two different places.

comment:3 Changed 8 years ago by Brian Warner

Resolution: fixed
Status: newclosed

That fixed it, and the buildbot is green. Closing this, and I'll do a 0.10.1 release shortly.

Note: See TracTickets for help on using tickets.