Re: [Python-Dev] Removing PendingDeprecationWarning

2019-04-01 Thread Inada Naoki
On Sat, Mar 30, 2019 at 7:31 PM Nick Coghlan wrote: > > That's just a documentation fix: "If you're not sure whether to use > DeprecationWarning or PendingDeprecationWarning, use > DeprecationWarning". > Current proposed patch is: """ .. note:: PendingDeprecationWarning was introduced as an

Re: [Python-Dev] Removing PendingDeprecationWarning

2019-03-30 Thread Nick Coghlan
On Thu, 28 Mar 2019 at 12:31, Inada Naoki wrote: > I didn't know "right way" to chose DeprecationWarning or > PendingDeprecationWarning. That's just a documentation fix: "If you're not sure whether to use DeprecationWarning or PendingDeprecationWarning, use DeprecationWarning". Cheers, Nick.

Re: [Python-Dev] Removing PendingDeprecationWarning

2019-03-30 Thread Nick Coghlan
On Wed, 27 Mar 2019 at 20:29, Inada Naoki wrote: > > On Mon, Mar 25, 2019 at 10:11 PM Inada Naoki wrote: > > > > C, Rust, Java, Ruby, PHP, don't have PendingDeprecation. > > Programmers only need Deprecation. Why programmers need PendingDeprecation > > only in Python? > > > > Any comments about

Re: [Python-Dev] Removing PendingDeprecationWarning

2019-03-27 Thread Inada Naoki
On Thu, Mar 28, 2019 at 12:26 AM Steve Dower wrote: > [snip] > 2. Do we want everyone else to stop using it for their own purposes? [snip] > > The second question is harder to answer, and in the absence of input > from those who are already using it (or the absence of evidence that > nobody else

Re: [Python-Dev] Removing PendingDeprecationWarning

2019-03-27 Thread Brett Cannon
On Wed, Mar 27, 2019 at 3:26 AM Inada Naoki wrote: > On Mon, Mar 25, 2019 at 10:11 PM Inada Naoki > wrote: > > > > C, Rust, Java, Ruby, PHP, don't have PendingDeprecation. > > Programmers only need Deprecation. Why programmers need > PendingDeprecation > > only in Python? > > > > Any comments

Re: [Python-Dev] Removing PendingDeprecationWarning

2019-03-27 Thread Paul Moore
On Wed, 27 Mar 2019 at 15:29, Steve Dower wrote: > If someone can show that either no third-parties are using it, or all > those that do will probably never explicitly support Python 3.8 or > later, or all those that do would prefer to stop using it, then I'll > happily change my mind here. But

Re: [Python-Dev] Removing PendingDeprecationWarning

2019-03-27 Thread Steve Dower
On 27Mar2019 0324, Inada Naoki wrote: On Mon, Mar 25, 2019 at 10:11 PM Inada Naoki wrote: C, Rust, Java, Ruby, PHP, don't have PendingDeprecation. Programmers only need Deprecation. Why programmers need PendingDeprecation only in Python? Any comments about this? I want to document

Re: [Python-Dev] Removing PendingDeprecationWarning

2019-03-27 Thread Inada Naoki
On Mon, Mar 25, 2019 at 10:11 PM Inada Naoki wrote: > > C, Rust, Java, Ruby, PHP, don't have PendingDeprecation. > Programmers only need Deprecation. Why programmers need PendingDeprecation > only in Python? > Any comments about this? I want to document PendingDeprecationWarning is deprecated

Re: [Python-Dev] Removing PendingDeprecationWarning

2019-03-25 Thread Inada Naoki
On Mon, Mar 25, 2019 at 8:53 PM Nick Coghlan wrote: > > On Mon, 25 Mar 2019 at 14:39, Inada Naoki wrote: > > We have many ways to deprecation: > > > > * Document only deprecation (no warning) -- no actual removal is planned. > > * FutureWarning -- to warn end users. > > * DeprecationWarning --

Re: [Python-Dev] Removing PendingDeprecationWarning

2019-03-25 Thread Antoine Pitrou
On Mon, 25 Mar 2019 21:53:07 +1000 Nick Coghlan wrote: > On Mon, 25 Mar 2019 at 14:39, Inada Naoki wrote: > > We have many ways to deprecation: > > > > * Document only deprecation (no warning) -- no actual removal is planned. > > * FutureWarning -- to warn end users. > > * DeprecationWarning --

Re: [Python-Dev] Removing PendingDeprecationWarning

2019-03-25 Thread Nick Coghlan
On Mon, 25 Mar 2019 at 14:39, Inada Naoki wrote: > We have many ways to deprecation: > > * Document only deprecation (no warning) -- no actual removal is planned. > * FutureWarning -- to warn end users. > * DeprecationWarning -- to warn Python developers. > * PendingDeprecationWarning -- to warn

Re: [Python-Dev] Removing PendingDeprecationWarning

2019-03-24 Thread Inada Naoki
On Sun, Mar 24, 2019 at 8:57 PM Nick Coghlan wrote: > > > > > It was added "not be printed by default" version of DeprecationWarning. > > But DeprecationWarning is not printed by default now. > > No, this was covered in PEP 565, and PendingDeprecationWarning was > explicitly kept as a way of

Re: [Python-Dev] Removing PendingDeprecationWarning

2019-03-24 Thread Nick Coghlan
On Fri, 22 Mar 2019 at 12:45, Inada Naoki wrote: > > Hi, all. > > I'm thinking about removing PendingDeprecationWarning. > (previous discussion: > https://discuss.python.org/t/pendingdeprecationwarning-is-really-useful/1038) > > It was added "not be printed by default" version of

Re: [Python-Dev] Removing PendingDeprecationWarning

2019-03-23 Thread Inada Naoki
On Sun, Mar 24, 2019 at 8:07 AM Brett Cannon wrote: > > > I've made the same mistake of assuming something that made no sense to me > wouldn't make sense to anyone else and I have been proven wrong nearly every > time. ;) > > -Brett > And beta and RC phase can be used to detect such breakage.

Re: [Python-Dev] Removing PendingDeprecationWarning

2019-03-23 Thread Brett Cannon
On Fri, Mar 22, 2019 at 6:19 PM Inada Naoki wrote: > On Sat, Mar 23, 2019 at 3:02 AM Brett Cannon wrote: > > > >> > >> There might be some small troubles. But it was small enough for > >> Python minor versions, I think. > > > > > > I don't think it's worth the cost to users. We can just

Re: [Python-Dev] Removing PendingDeprecationWarning

2019-03-22 Thread Inada Naoki
I created the PR to deprecate PendingDeprecationWarning only in document. https://github.com/python/cpython/pull/12505 On Sat, Mar 23, 2019 at 10:18 AM Inada Naoki wrote: > > On Sat, Mar 23, 2019 at 3:02 AM Brett Cannon wrote: > > > >> > >> There might be some small troubles. But it was small

Re: [Python-Dev] Removing PendingDeprecationWarning

2019-03-22 Thread Inada Naoki
On Sat, Mar 23, 2019 at 3:02 AM Brett Cannon wrote: > >> >> There might be some small troubles. But it was small enough for >> Python minor versions, I think. > > > I don't think it's worth the cost to users. We can just choose to stop using > it in the stdlib and not use

Re: [Python-Dev] Removing PendingDeprecationWarning

2019-03-22 Thread Steve Dower
On 22Mar2019 1101, Brett Cannon wrote: On Fri, Mar 22, 2019 at 10:37 AM Inada Naoki > wrote: There might be some small troubles.  But it was small enough for Python minor versions, I think.  I don't think it's worth the cost to users. We can just choose

Re: [Python-Dev] Removing PendingDeprecationWarning

2019-03-22 Thread Inada Naoki
On Sat, Mar 23, 2019 at 2:26 AM Brett Cannon wrote: > > > We can't do that as it will break code. Think of code which is having > warnings raise exceptions and that are purposefully catching > PendingDeprecationWarning but not DeprecationWarning; this change would break > that. These classes

Re: [Python-Dev] Removing PendingDeprecationWarning

2019-03-22 Thread Brett Cannon
On Fri, Mar 22, 2019 at 12:41 AM Victor Stinner wrote: > Hi, > > I agree to make PendingDeprecationWarning an alias to > DeprecationWarning. I never liked "PendingDeprecationWarning" name, > it's way too long to type :-D > > Le ven. 22 mars 2019 à 03:45, Inada Naoki a > écrit : > > I want to

Re: [Python-Dev] Removing PendingDeprecationWarning

2019-03-22 Thread Victor Stinner
Le ven. 22 mars 2019 à 13:05, Serhiy Storchaka a écrit : > > The main problem is complexity. In other words, learning cost. > > Do you have evidences that many people have troubles with learning > PendingDeprecationWarning? I have no idea when I should use PendingDeprecationWarning rather than

Re: [Python-Dev] Removing PendingDeprecationWarning

2019-03-22 Thread Serhiy Storchaka
22.03.19 13:23, Inada Naoki пише: On Fri, Mar 22, 2019 at 7:36 PM Serhiy Storchaka wrote: What is wrong with PendingDeprecationWarning? What problem do you want to solve at the cost of removing this feature? The main problem is complexity. In other words, learning cost. Do you have

Re: [Python-Dev] Removing PendingDeprecationWarning

2019-03-22 Thread Inada Naoki
On Fri, Mar 22, 2019 at 8:49 PM Serhiy Storchaka wrote: > > > And I can easily ask the converse question: what problem do you want to > > solve by including that feature? > > It allowed to mark a feature deprecated for developers without harming > the end users. > Both of DeprecationWarning and

Re: [Python-Dev] Removing PendingDeprecationWarning

2019-03-22 Thread Serhiy Storchaka
22.03.19 12:51, Jeroen Demeyer пише: On 2019-03-22 11:33, Serhiy Storchaka wrote: What is wrong with PendingDeprecationWarning? It serves the same purpose as DeprecationWarning: it indicates that a feature is planned to be removed in the future. There is no point in having two warnings with

Re: [Python-Dev] Removing PendingDeprecationWarning

2019-03-22 Thread Inada Naoki
On Fri, Mar 22, 2019 at 7:36 PM Serhiy Storchaka wrote: > > > > > How do you think? May I do it in Python 3.8? > > What is wrong with PendingDeprecationWarning? What problem do you want > to solve at the cost of removing this feature? > The main problem is complexity. In other words, learning

Re: [Python-Dev] Removing PendingDeprecationWarning

2019-03-22 Thread Jeroen Demeyer
On 2019-03-22 11:33, Serhiy Storchaka wrote: What is wrong with PendingDeprecationWarning? It serves the same purpose as DeprecationWarning: it indicates that a feature is planned to be removed in the future. There is no point in having two warnings with exactly the same meaning. What

Re: [Python-Dev] Removing PendingDeprecationWarning

2019-03-22 Thread Serhiy Storchaka
22.03.19 04:41, Inada Naoki пише: I'm thinking about removing PendingDeprecationWarning. (previous discussion: https://discuss.python.org/t/pendingdeprecationwarning-is-really-useful/1038) It was added "not be printed by default" version of DeprecationWarning. But DeprecationWarning is not

Re: [Python-Dev] Removing PendingDeprecationWarning

2019-03-22 Thread Steve Holden
On Fri, Mar 22, 2019 at 8:43 AM Victor Stinner wrote: > Le ven. 22 mars 2019 à 09:16, Inada Naoki a > écrit : > > > > We have `socket.error` for long time. > > > > > > And it's perfectly fine, no? > > > > > > > Yes. Waiting 10+ years to remove aliases is fine. > > [...] > > Right now, the

Re: [Python-Dev] Removing PendingDeprecationWarning

2019-03-22 Thread Victor Stinner
Le ven. 22 mars 2019 à 09:16, Inada Naoki a écrit : > > > We have `socket.error` for long time. > > > > And it's perfectly fine, no? > > > > Yes. Waiting 10+ years to remove aliases is fine. Sure. Let me elaborate my point of view on deprecation, since we are discussing it here (and I know

Re: [Python-Dev] Removing PendingDeprecationWarning

2019-03-22 Thread Inada Naoki
On Fri, Mar 22, 2019 at 5:06 PM Victor Stinner wrote: > > Le ven. 22 mars 2019 à 08:54, Inada Naoki a écrit : > > Yes. It will be removed at some point, but not in near future. > > > > But when when backward compatibility can be kept by alias, > > we can be very lazy about removing it. > >

Re: [Python-Dev] Removing PendingDeprecationWarning

2019-03-22 Thread Victor Stinner
Le ven. 22 mars 2019 à 08:54, Inada Naoki a écrit : > Yes. It will be removed at some point, but not in near future. > > But when when backward compatibility can be kept by alias, > we can be very lazy about removing it. Honestly, I don't see the point of removing PendingDeprecationWarning

Re: [Python-Dev] Removing PendingDeprecationWarning

2019-03-22 Thread Inada Naoki
On Fri, Mar 22, 2019 at 4:40 PM Victor Stinner wrote: > > > > More aggressively, I want to remove PendingDeprecationWarning class, > > and `PendingDeprecationWarning = DeprecationWarning` for backward > > compatibility. > > I'm not sure that I understand well. Do you want to remove the >

Re: [Python-Dev] Removing PendingDeprecationWarning

2019-03-22 Thread Victor Stinner
Hi, I agree to make PendingDeprecationWarning an alias to DeprecationWarning. I never liked "PendingDeprecationWarning" name, it's way too long to type :-D Le ven. 22 mars 2019 à 03:45, Inada Naoki a écrit : > I want to stop using PendingDeprecationWarning for new deprecation. I'm fine with

[Python-Dev] Removing PendingDeprecationWarning

2019-03-21 Thread Inada Naoki
Hi, all. I'm thinking about removing PendingDeprecationWarning. (previous discussion: https://discuss.python.org/t/pendingdeprecationwarning-is-really-useful/1038) It was added "not be printed by default" version of DeprecationWarning. But DeprecationWarning is not printed by default now. We