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

[Python-Dev] Invitation to the PyCon typing summit (Thu, May 2nd, 1-5pm, at PyCon in Cleveland)

2019-03-22 Thread Guido van Rossum
The typing summit is primarily a place for developers of type checkers to collaborate, but we are also inviting (potential) users of type checkers. For example, there are plans to extend the standard Python type system with features intended to support numpy, Pandas, tensorflow and similar

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

[Python-Dev] Summary of Python tracker Issues

2019-03-22 Thread Python tracker
ACTIVITY SUMMARY (2019-03-15 - 2019-03-22) Python tracker at https://bugs.python.org/ To view or respond to any of the issues listed below, click on the issue. Do NOT respond to this message. Issues counts and deltas: open7051 ( +3) closed 41100 (+91) total 48151 (+94) Open issues

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] Replacement for array.array('u')?

2019-03-22 Thread Steve Dower
On 22Mar2019 0433, Antoine Pitrou wrote: The question is: why would you use a array.array() with a Windows C API? I started replying to this with a whole lot of examples, and eventually convinced myself that you wouldn't (or shouldn't). That said, I see value in having a type for

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] Replacement for array.array('u')?

2019-03-22 Thread Antoine Pitrou
On Fri, 22 Mar 2019 16:11:45 +0200 Serhiy Storchaka wrote: > 22.03.19 13:33, Antoine Pitrou пише: > > On Fri, 22 Mar 2019 13:27:08 +0200 > > Serhiy Storchaka wrote: > >> Making it always 32 bits would be compatibility breaking change. > >> Currently array('u') represents the wchar_t string,

Re: [Python-Dev] Replacement for array.array('u')?

2019-03-22 Thread Serhiy Storchaka
22.03.19 13:33, Antoine Pitrou пише: On Fri, 22 Mar 2019 13:27:08 +0200 Serhiy Storchaka wrote: Making it always 32 bits would be compatibility breaking change. Currently array('u') represents the wchar_t string, and many API on Windows require it. The question is: why would you use a

Re: [Python-Dev] Replacement for array.array('u')?

2019-03-22 Thread Antoine Pitrou
On Fri, 22 Mar 2019 12:51:49 +0100 Stefan Behnel wrote: > Antoine Pitrou schrieb am 22.03.19 um 11:39: > > On Fri, 22 Mar 2019 20:31:33 +1300 Greg Ewing wrote: > >> A poster on comp.lang.python is asking about array.array('u'). > >> He wants an efficient mutable collection of unicode characters

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] Replacement for array.array('u')?

2019-03-22 Thread Stefan Behnel
Antoine Pitrou schrieb am 22.03.19 um 11:39: > On Fri, 22 Mar 2019 20:31:33 +1300 Greg Ewing wrote: >> A poster on comp.lang.python is asking about array.array('u'). >> He wants an efficient mutable collection of unicode characters >> that can be initialised from a string. > > TBH, I think anyone

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] Replacement for array.array('u')?

2019-03-22 Thread Serhiy Storchaka
22.03.19 09:45, Victor Stinner пише: Internally, CPython has a _PyUnicodeWriter which is an efficient way to create a string but appending substrings or characters. _PyUnicodeWriter changes the internal storage format depending on characters code points (ascii or latin1: 1 byte/character, BMP: 2

Re: [Python-Dev] Replacement for array.array('u')?

2019-03-22 Thread Antoine Pitrou
On Fri, 22 Mar 2019 13:27:08 +0200 Serhiy Storchaka wrote: > 22.03.19 09:31, Greg Ewing пише: > > A poster on comp.lang.python is asking about array.array('u'). > > He wants an efficient mutable collection of unicode characters > > that can be initialised from a string. > > > > According to the

Re: [Python-Dev] Replacement for array.array('u')?

2019-03-22 Thread Serhiy Storchaka
22.03.19 09:31, Greg Ewing пише: A poster on comp.lang.python is asking about array.array('u'). He wants an efficient mutable collection of unicode characters that can be initialised from a string. According to the docs, the 'u' code is deprecated and will be removed in 4.0, but no alternative

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] Replacement for array.array('u')?

2019-03-22 Thread Inada Naoki
FYI, I have created issue on bugs.python.org about adding deprecation warning for array('u'). https://bugs.python.org/issue36299 I created PR to change Py_UNICODE to Py_UCS4, instead of deprecate it. https://github.com/python/cpython/pull/12497 Then, I found same change had made and reverted in

Re: [Python-Dev] Replacement for array.array('u')?

2019-03-22 Thread Antoine Pitrou
On Fri, 22 Mar 2019 20:31:33 +1300 Greg Ewing wrote: > A poster on comp.lang.python is asking about array.array('u'). > He wants an efficient mutable collection of unicode characters > that can be initialised from a string. TBH, I think anyone trying to use array.array should be directed to

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] Replacement for array.array('u')?

2019-03-22 Thread Steven D'Aprano
On Fri, Mar 22, 2019 at 08:31:33PM +1300, Greg Ewing wrote: > A poster on comp.lang.python is asking about array.array('u'). > He wants an efficient mutable collection of unicode characters > that can be initialised from a string. > > According to the docs, the 'u' code is deprecated and will be

Re: [Python-Dev] Replacement for array.array('u')?

2019-03-22 Thread Inada Naoki
On Fri, Mar 22, 2019 at 4:38 PM Greg Ewing wrote: > > A poster on comp.lang.python is asking about array.array('u'). > He wants an efficient mutable collection of unicode characters > that can be initialised from a string. > > According to the docs, the 'u' code is deprecated and will be >

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] Replacement for array.array('u')?

2019-03-22 Thread Victor Stinner
Hi, Internally, CPython has a _PyUnicodeWriter which is an efficient way to create a string but appending substrings or characters. _PyUnicodeWriter changes the internal storage format depending on characters code points (ascii or latin1: 1 byte/character, BMP: 2 b/c, full UCS: 4 b/c). I tried

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] Replacement for array.array('u')?

2019-03-22 Thread Greg Ewing
A poster on comp.lang.python is asking about array.array('u'). He wants an efficient mutable collection of unicode characters that can be initialised from a string. According to the docs, the 'u' code is deprecated and will be removed in 4.0, but no alternative is suggested. Why is this being