[PATCH 1 of 8] bdiff: add _version to help detect breaking binary changes

Yuya Nishihara yuya at tcha.org
Wed May 3 00:18:16 EDT 2017


On Tue, 2 May 2017 19:41:32 -0700, Jun Wu wrote:
> Excerpts from Yuya Nishihara's message of 2017-05-03 11:22:45 +0900:
> > > The problem is that only works with non-default modulepolicy.
> > 
> > So the default of in-place build will be changed to 'allow'. The current
> > 'c' policy is 'allow' in practice as we have many adhoc fallback to pure
> > functions.
> 
> Cleaning those inconsistence does not conflict with this series.
> 
> This series solves extra problems confidently and without copy-paste or
> even rename issues:
> 
>   - BC to complex CPython object, like chnagelog.index

Maybe rename index to index2 ?

>   - modulepolicy='c'

Should be okay to fail with ImportError or AttributeError as the user
requested.

> Mixing python and C modules could lead to surprises if the API changes state
> in the moudle. Like "set(x, y)" -> affect C moudle state; "get2(x)" ->
> "get2" is only in pure, and the state "x" is not in pure moudle state. 

Yeah. So that's the only difference between my version and yours. I don't
say my version is strictly better. The goal of my series is to get rid of
our importer hacks, CFFI mess and import cycle around encoding.py. I believe
your module versioning patches will get slightly simpler if we had no importer
hack.


More information about the Mercurial-devel mailing list