[Zope-dev] zope.interface versions, ZTK 1.0 and later

Tres Seaver tseaver at palladion.com
Fri Aug 12 14:46:40 EDT 2011


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

I've been wrestling with Launchpad bugs for zope.interface lately, and
would like to hear from folks about the issues involved.

- ------------------------------------ %< --------------------------------
Overview
- ---------

- - Version 3.6.1 was the original ZTK 1.0 version.  The substantial
  changes since then have been mostly due to issues which showed up
  while working on Python3 compatibility:

  o LP # 675064:  Specify return value type for C optimizations module
    init under Python 3 (fixed in zope.interface 3.6.2).

  o LP 804951:  InterfaceClass instances were unhashable under Python
    3.x. (fixed in zope.interface 3.6.4).

  The fix here actually provoked the following bugs / fixes:

  o LP #811792:  work around buggy behavior in some subclasses of
    'zope.interface.interface.InterfaceClass', which invoke '__hash__'
    before initializing '__module__' and '__name__'.

  o Fix Python 2.5 incompatibility introduced in new tests of
    '__hash__'.

  o LP #825249: Fix test failure (only under 'python setup.py test')
    in those same new tests.

  At this point, the tests for the trunk (but not the main module
  itself) are not Python 2.4 compatible, because they try to test that
  a UserWarning is emitted using a 'with' statement.

- - This fix is for non-CPython platforms:

  o LP #804832:  Do not build C extension under PyPy or Jython.

- - There is one issue not directly related to porting:

  o LP #570942:  Now correctly compare interfaces from different
    modules but with the same names (fixed in 3.6.3).

  This fix is in two parts:  it corrects extracting the '__module__'
  attribute, and adds the missing "rich comparison" operators
  ('__eq__', '__ne__', '__le__', '__ge__')


  The real "slippery slope" was adding '__eq__':  it then required
  adding '__hash__', because Python's dictionary semantics require that
  objects which compare equal also hash equal, which then provokes the
  issues with subclasses which stash the instances in a dict before
  initializing the '__module__' and '__name__' attributes.

- - The ZTK 1.0 branch was bumped to include zope.interface 3.6.3, which
  contained a number of the higer-risk changes, mostly made for porting
  purposes.


Proposal
- --------

- - Revert ZTK 1.0 to use zope.interface 3.6.1.  (We can skip this part if
  the next step goes quickly).

- - Create a 3.6 branch in SVN, and revert all the post-3.6.1 changes on
  it.  Release a new 3.6.6 from this branch, possibly after applying a
  new, more minimal fix for LP #570942.

- - Bump ZTK 1.0 to use the zope.interface 3.6.6.

- - Freeze development on the 3.6 branch.

- - Release a 3.7.0 version from the trunk, with all the porting changes
  intact.  Update ZTK 1.1 to use 3.7.0,
- ------------------------------------ %< --------------------------------

Thoughts?


Tres.
- -- 
===================================================================
Tres Seaver          +1 540-429-0999          tseaver at palladion.com
Palladion Software   "Excellence by Design"    http://palladion.com
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAk5FdRAACgkQ+gerLs4ltQ5dnACfRSDauatZn1iMmefLsIQABcDJ
nSgAoNyJu8AS3M9ndEWveo/pbIVEfSRU
=gSl/
-----END PGP SIGNATURE-----



More information about the Zope-Dev mailing list