D2928: thirdparty: vendor zope.interface 4.4.3

2018-03-30 Thread indygreg (Gregory Szorc)
This revision was automatically updated to reflect the committed changes.
Closed by commit rHG943d77fc07a3: thirdparty: vendor zope.interface 4.4.3 
(authored by indygreg, committed by ).

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D2928?vs=7241=7396

REVISION DETAIL
  https://phab.mercurial-scm.org/D2928

AFFECTED FILES
  mercurial/thirdparty/zope/__init__.py
  mercurial/thirdparty/zope/interface/LICENSE.txt
  mercurial/thirdparty/zope/interface/__init__.py
  mercurial/thirdparty/zope/interface/_compat.py
  mercurial/thirdparty/zope/interface/_flatten.py
  mercurial/thirdparty/zope/interface/_zope_interface_coptimizations.c
  mercurial/thirdparty/zope/interface/adapter.py
  mercurial/thirdparty/zope/interface/advice.py
  mercurial/thirdparty/zope/interface/common/__init__.py
  mercurial/thirdparty/zope/interface/common/idatetime.py
  mercurial/thirdparty/zope/interface/common/interfaces.py
  mercurial/thirdparty/zope/interface/common/mapping.py
  mercurial/thirdparty/zope/interface/common/sequence.py
  mercurial/thirdparty/zope/interface/declarations.py
  mercurial/thirdparty/zope/interface/document.py
  mercurial/thirdparty/zope/interface/exceptions.py
  mercurial/thirdparty/zope/interface/interface.py
  mercurial/thirdparty/zope/interface/interfaces.py
  mercurial/thirdparty/zope/interface/registry.py
  mercurial/thirdparty/zope/interface/ro.py
  mercurial/thirdparty/zope/interface/verify.py

To: indygreg, #hg-reviewers, durin42
Cc: mercurial-devel
___
Mercurial-devel mailing list
Mercurial-devel@mercurial-scm.org
https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel


D2928: thirdparty: vendor zope.interface 4.4.3

2018-03-21 Thread indygreg (Gregory Szorc)
indygreg created this revision.
Herald added a subscriber: mercurial-devel.
Herald added a reviewer: hg-reviewers.

REVISION SUMMARY
  I've been trying to formalize interfaces for various components
  of Mercurial. So far, we've been using the "abc" package. This
  package is "good enough" for a lot of tasks. But it quickly
  falls over. For example, if you declare an @abc.abstractproperty,
  you must implement that attribute with a @property or the class
  compile time checking performed by abc will complain. This often
  forces you to implement dumb @property wrappers to return a
  _ prefixed attribute of the sane name. That's ugly.
  
  I've also wanted to implement automated checking that classes
  conform to various interfaces and don't expose other "public"
  attributes.
  
  After doing a bit of research and asking around, the general
  consensus seems to be that zope.interface is the best package for
  doing interface-based programming in Python. It has built-in
  support for verifying classes and objects conform to interfaces.
  It allows an interface's properties to be defined during __init__.
  There's even an "adapter registry" that allow you to register
  interfaces and look up which classes implement them. That could
  potentially be useful for places where our custom registry.py
  modules currently facilitates central registrations, but at a
  type level. Imagine extensions providing alternate implementations
  of things like the local repository interface to allow opening
  repositories with custom requirements.
  
  Anyway, this commit vendors zope.interface 4.4.3. The contents of
  the source tarball have been copied into mercurial/thirdparty/zope/
  without modifications.
  
  Test modules have been removed because they are not interesting
  to us.
  
  The LICENSE.txt file has been copied so it lives next to the
  source.
  
  The Python modules don't use relative imports. zope/__init__.py
  defines a namespace package. So we'll need to modify the source
  code before this package is usable inside Mercurial. This will
  be done in subsequent commits.
  
  1. no-check-commit for various style failures

REPOSITORY
  rHG Mercurial

REVISION DETAIL
  https://phab.mercurial-scm.org/D2928

AFFECTED FILES
  mercurial/thirdparty/zope/__init__.py
  mercurial/thirdparty/zope/interface/LICENSE.txt
  mercurial/thirdparty/zope/interface/__init__.py
  mercurial/thirdparty/zope/interface/_compat.py
  mercurial/thirdparty/zope/interface/_flatten.py
  mercurial/thirdparty/zope/interface/_zope_interface_coptimizations.c
  mercurial/thirdparty/zope/interface/adapter.py
  mercurial/thirdparty/zope/interface/advice.py
  mercurial/thirdparty/zope/interface/common/__init__.py
  mercurial/thirdparty/zope/interface/common/idatetime.py
  mercurial/thirdparty/zope/interface/common/interfaces.py
  mercurial/thirdparty/zope/interface/common/mapping.py
  mercurial/thirdparty/zope/interface/common/sequence.py
  mercurial/thirdparty/zope/interface/declarations.py
  mercurial/thirdparty/zope/interface/document.py
  mercurial/thirdparty/zope/interface/exceptions.py
  mercurial/thirdparty/zope/interface/interface.py
  mercurial/thirdparty/zope/interface/interfaces.py
  mercurial/thirdparty/zope/interface/registry.py
  mercurial/thirdparty/zope/interface/ro.py
  mercurial/thirdparty/zope/interface/verify.py

To: indygreg, #hg-reviewers
Cc: mercurial-devel
___
Mercurial-devel mailing list
Mercurial-devel@mercurial-scm.org
https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel