Submitter | Katsunori FUJIWARA |
---|---|
Date | March 9, 2016, 2:29 p.m. |
Message ID | <3d5ebabcfa15563df466.1457533747@feefifofum> |
Download | mbox | patch |
Permalink | /patch/13719/ |
State | Changes Requested |
Delegated to: | Sean Farley |
Headers | show |
Comments
On 03/09/2016 02:29 PM, FUJIWARA Katsunori wrote: > # HG changeset patch > # User FUJIWARA Katsunori <foozy@lares.dti.ne.jp> > # Date 1457533235 -32400 > # Wed Mar 09 23:20:35 2016 +0900 > # Node ID 3d5ebabcfa15563df46646edf05f8d1da2343a2b > # Parent f126bb86a4e282fc1113a9c67777e9ca3764e57b > revset: remove useless class > > Previous patch makes this classes useless by replacing it with > registrar.revsetpredicate. It seems like this is going to break extension. Can we have a deprecation periode for this? (using deprecation api with devel warning?). In all cases, we probably want a (API) to this.
At Wed, 9 Mar 2016 14:50:51 +0000, Pierre-Yves David wrote: > > > > On 03/09/2016 02:29 PM, FUJIWARA Katsunori wrote: > > # HG changeset patch > > # User FUJIWARA Katsunori <foozy@lares.dti.ne.jp> > > # Date 1457533235 -32400 > > # Wed Mar 09 23:20:35 2016 +0900 > > # Node ID 3d5ebabcfa15563df46646edf05f8d1da2343a2b > > # Parent f126bb86a4e282fc1113a9c67777e9ca3764e57b > > revset: remove useless class > > > > Previous patch makes this classes useless by replacing it with > > registrar.revsetpredicate. > > It seems like this is going to break extension. > > Can we have a deprecation periode for this? (using deprecation api with > devel warning?). > > In all cases, we probably want a (API) to this. OK, I'll send revised series with deprecation handling. > -- > Pierre-Yves David > ---------------------------------------------------------------------- [FUJIWARA Katsunori] foozy@lares.dti.ne.jp
On Thu, 10 Mar 2016 00:23:52 +0900, FUJIWARA Katsunori wrote: > At Wed, 9 Mar 2016 14:50:51 +0000, > Pierre-Yves David wrote: > > On 03/09/2016 02:29 PM, FUJIWARA Katsunori wrote: > > > # HG changeset patch > > > # User FUJIWARA Katsunori <foozy@lares.dti.ne.jp> > > > # Date 1457533235 -32400 > > > # Wed Mar 09 23:20:35 2016 +0900 > > > # Node ID 3d5ebabcfa15563df46646edf05f8d1da2343a2b > > > # Parent f126bb86a4e282fc1113a9c67777e9ca3764e57b > > > revset: remove useless class > > > > > > Previous patch makes this classes useless by replacing it with > > > registrar.revsetpredicate. > > > > It seems like this is going to break extension. > > > > Can we have a deprecation periode for this? (using deprecation api with > > devel warning?). > > > > In all cases, we probably want a (API) to this. > > OK, I'll send revised series with deprecation handling. Do we have to care for it? These classes exist only in 3.7.x, and there would be no third-party extension that requires 3.7. I think the (API) flag is enough.
On 03/09/2016 03:41 PM, Yuya Nishihara wrote: > On Thu, 10 Mar 2016 00:23:52 +0900, FUJIWARA Katsunori wrote: >> At Wed, 9 Mar 2016 14:50:51 +0000, >> Pierre-Yves David wrote: >>> On 03/09/2016 02:29 PM, FUJIWARA Katsunori wrote: >>>> # HG changeset patch >>>> # User FUJIWARA Katsunori <foozy@lares.dti.ne.jp> >>>> # Date 1457533235 -32400 >>>> # Wed Mar 09 23:20:35 2016 +0900 >>>> # Node ID 3d5ebabcfa15563df46646edf05f8d1da2343a2b >>>> # Parent f126bb86a4e282fc1113a9c67777e9ca3764e57b >>>> revset: remove useless class >>>> >>>> Previous patch makes this classes useless by replacing it with >>>> registrar.revsetpredicate. >>> >>> It seems like this is going to break extension. >>> >>> Can we have a deprecation periode for this? (using deprecation api with >>> devel warning?). >>> >>> In all cases, we probably want a (API) to this. >> >> OK, I'll send revised series with deprecation handling. > > Do we have to care for it? These classes exist only in 3.7.x, and there would > be no third-party extension that requires 3.7. I think the (API) flag is enough. Who knows what third party extension do? If this is cheap to keep the deprecated API in until 3.9 let's do it. Cheers,
At Wed, 9 Mar 2016 15:44:37 +0000, Pierre-Yves David wrote: > > On 03/09/2016 03:41 PM, Yuya Nishihara wrote: > > On Thu, 10 Mar 2016 00:23:52 +0900, FUJIWARA Katsunori wrote: > >> At Wed, 9 Mar 2016 14:50:51 +0000, > >> Pierre-Yves David wrote: > >>> On 03/09/2016 02:29 PM, FUJIWARA Katsunori wrote: > >>>> # HG changeset patch > >>>> # User FUJIWARA Katsunori <foozy@lares.dti.ne.jp> > >>>> # Date 1457533235 -32400 > >>>> # Wed Mar 09 23:20:35 2016 +0900 > >>>> # Node ID 3d5ebabcfa15563df46646edf05f8d1da2343a2b > >>>> # Parent f126bb86a4e282fc1113a9c67777e9ca3764e57b > >>>> revset: remove useless class > >>>> > >>>> Previous patch makes this classes useless by replacing it with > >>>> registrar.revsetpredicate. > >>> > >>> It seems like this is going to break extension. > >>> > >>> Can we have a deprecation periode for this? (using deprecation api with > >>> devel warning?). > >>> > >>> In all cases, we probably want a (API) to this. > >> > >> OK, I'll send revised series with deprecation handling. Sorry, I forgot that these registration never take 'ui' argument in any cases, at previous post. Describing "this class is deprecated" or so in docstring only might be all that we can do for deprecation of these classes. > > Do we have to care for it? These classes exist only in 3.7.x, and there would > > be no third-party extension that requires 3.7. I think the (API) flag is enough. > > Who knows what third party extension do? If this is cheap to keep the > deprecated API in until 3.9 let's do it. And sorry again. I overlooked that replacing revset.predicate by registrar.revsetpredicate already broke extpredicate, because I think only about removing extpredicate soon :-< Which should we do for revset.extpredicate ? 1. drop and revise (or partially backout) change below, which replaces revset.predicate by registrar.revsetpredicate, to keep revset.extpredicate working as expected http://42.netv6.net/clowncopter/rev/90fa03cf0be3 and remove them at 3.9 or so 2. remove revset.extpredicate with (API) flag > Cheers, > > -- > Pierre-Yves David > ---------------------------------------------------------------------- [FUJIWARA Katsunori] foozy@lares.dti.ne.jp
On 03/10/2016 12:49 PM, FUJIWARA Katsunori wrote: > At Wed, 9 Mar 2016 15:44:37 +0000, > Pierre-Yves David wrote: >> >> On 03/09/2016 03:41 PM, Yuya Nishihara wrote: >>> On Thu, 10 Mar 2016 00:23:52 +0900, FUJIWARA Katsunori wrote: >>>> At Wed, 9 Mar 2016 14:50:51 +0000, >>>> Pierre-Yves David wrote: >>>>> On 03/09/2016 02:29 PM, FUJIWARA Katsunori wrote: >>>>>> # HG changeset patch >>>>>> # User FUJIWARA Katsunori <foozy@lares.dti.ne.jp> >>>>>> # Date 1457533235 -32400 >>>>>> # Wed Mar 09 23:20:35 2016 +0900 >>>>>> # Node ID 3d5ebabcfa15563df46646edf05f8d1da2343a2b >>>>>> # Parent f126bb86a4e282fc1113a9c67777e9ca3764e57b >>>>>> revset: remove useless class >>>>>> >>>>>> Previous patch makes this classes useless by replacing it with >>>>>> registrar.revsetpredicate. >>>>> >>>>> It seems like this is going to break extension. >>>>> >>>>> Can we have a deprecation periode for this? (using deprecation api with >>>>> devel warning?). >>>>> >>>>> In all cases, we probably want a (API) to this. >>>> >>>> OK, I'll send revised series with deprecation handling. > > Sorry, I forgot that these registration never take 'ui' argument in > any cases, at previous post. > > Describing "this class is deprecated" or so in docstring only might be > all that we can do for deprecation of these classes. > > >>> Do we have to care for it? These classes exist only in 3.7.x, and there would >>> be no third-party extension that requires 3.7. I think the (API) flag is enough. >> >> Who knows what third party extension do? If this is cheap to keep the >> deprecated API in until 3.9 let's do it. > > And sorry again. I overlooked that replacing revset.predicate by > registrar.revsetpredicate already broke extpredicate, because I think > only about removing extpredicate soon :-< > > Which should we do for revset.extpredicate ? > > 1. drop and revise (or partially backout) change below, which > replaces revset.predicate by registrar.revsetpredicate, to keep > revset.extpredicate working as expected > > http://42.netv6.net/clowncopter/rev/90fa03cf0be3 > > and remove them at 3.9 or so > > 2. remove revset.extpredicate with (API) flag If this is complicated to add a deprecation warning just drop the old API.
Patch
diff --git a/mercurial/revset.py b/mercurial/revset.py --- a/mercurial/revset.py +++ b/mercurial/revset.py @@ -484,28 +484,6 @@ safesymbols = set() predicate = registrar.revsetpredicate() -class extpredicate(registrar.delayregistrar): - """Decorator to register revset predicate in extensions - - Usage:: - - revsetpredicate = revset.extpredicate() - - @revsetpredicate('mypredicate(arg1, arg2[, arg3])') - def mypredicatefunc(repo, subset, x): - '''Explanation of this revset predicate .... - ''' - pass - - def uisetup(ui): - revsetpredicate.setup() - - 'revsetpredicate' instance above can be used to decorate multiple - functions, and 'setup()' on it registers all such functions at - once. - """ - registrar = predicate - @predicate('_destupdate') def _destupdate(repo, subset, x): # experimental revset for update destination