[Python-Dev] Re: Update colorsys with YUV conversions?

2021-11-12 Thread Guido van Rossum
There was talk of deprecating colorsys, but PEP 594 now lists it under "modules to keep" so I don't see why we couldn't improve it. The OP's reasons for doing so seem solid. I don't know anything about this topic so I'll leave it at that. On Fri, Nov 12, 2021 at 2:22 PM Terry Reedy wrote: >

[Python-Dev] Re: Update colorsys with YUV conversions?

2021-11-12 Thread Victor Stinner
I guess that you should agree on constants and then stick to them. Otherwise, we might have to add a parameter later to chose the conversion standard. The PR uses "ATSC BT.709 standard constant". Wikipedia says: "When encoding Y’CBCR video, BT.709 creates gamma-encoded luma (Y’) using matrix

[Python-Dev] Update colorsys with YUV conversions?

2021-11-12 Thread Terry Reedy
https://github.com/python/cpython/pull/29512 adds what appears to be well written conversions between RGB and YUV color systems, with tests. Are we allowing such improvements? If not, a module docstring note or comment should be added. -- Terry Jan Reedy

[Python-Dev] Re: Do we need to remove everything that's deprecated?

2021-11-12 Thread Christopher Barker
I sympathize with the OP, but I think never removing deprecated names is the wrong solution. If never removing those names is the appropriate action, then they never should have been changed in the first place. That is, we should be ( and I think are) very careful about gratuitously changing

[Python-Dev] Re: Having Sorted Containers in stdlib?

2021-11-12 Thread Marc-Andre Lemburg
On 12.11.2021 17:46, Bob Fang wrote: > > >> On 12 Nov 2021, at 16:32, Marc-Andre Lemburg > > wrote: >> >> Perhaps there's a reverse dependency graph we could use to find out >> why the package is downloaded this often. I remember having seen >> a project which does this,

[Python-Dev] Re: Do we need to remove everything that's deprecated?

2021-11-12 Thread Serhiy Storchaka
12.11.21 12:55, Petr Viktorin пише: >   AttributeError: '[...]Tests' object has no attribute 'failUnless' > (bpo-45162) This one caused me troubles more then one time. It is so easy to make a typo and write assertEquals instead of assertEqual or assertRaisesRegexp instead of assertRaisesRegex.

[Python-Dev] Summary of Python tracker Issues

2021-11-12 Thread Python tracker
ACTIVITY SUMMARY (2021-11-05 - 2021-11-12) 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: open7282 (+23) closed 50241 (+38) total 57523 (+61) Open issues

[Python-Dev] Re: Having Sorted Containers in stdlib?

2021-11-12 Thread Eric V. Smith
On 11/12/2021 11:31 AM, Chris Angelico wrote: I think that proves the value of download counts: very little. The highest on the list is a thing called botocore, which I've never heard of. What is it? It's a dependency of a number of Amazon web services. My guess is that it's a dependency of

[Python-Dev] Re: Having Sorted Containers in stdlib?

2021-11-12 Thread Bob Fang
> On 12 Nov 2021, at 16:32, Marc-Andre Lemburg wrote: > > Perhaps there's a reverse dependency graph we could use to find out > why the package is downloaded this often. I remember having seen > a project which does this, but have lost the URL. I believe this is the URL we are looking for:

[Python-Dev] Re: Having Sorted Containers in stdlib?

2021-11-12 Thread Damian Shaw
Yeah, a datapoint I didn't see mentioned is searching on public github repos for import sortedcontainers (which includes from sortedcontainers import). Obviously it's just one datapoint but it shows a very small count compared to other packages mentioned when looking at many of the stats

[Python-Dev] Re: Having Sorted Containers in stdlib?

2021-11-12 Thread Bob Fang
> And yet, nobody(?) admits to either using it or knowing what it could be > used for. How very curious :-/ trio (which IMHO is a somewhat high profile uses it): https://github.com/python-trio/trio/blob/master/trio/_core/_run.py#L27

[Python-Dev] Re: Having Sorted Containers in stdlib?

2021-11-12 Thread Bob Fang
> And yet, nobody(?) admits to either using it or knowing what it could be > used for. How very curious :-/ trio (which IMHO is a somewhat high profile uses it): https://github.com/python-trio/trio/blob/master/trio/_core/_run.py#L27

[Python-Dev] Re: Having Sorted Containers in stdlib?

2021-11-12 Thread Marc-Andre Lemburg
On 12.11.2021 17:10, Steven D'Aprano wrote: > On Fri, Nov 12, 2021 at 10:07:13AM -0500, Paul Ganssle wrote: > >> I knew about sortedcontainers and I also don't remember ever seeing a >> situation where I needed one or recommended its use. > > We have a very odd situation where apparently

[Python-Dev] Re: Having Sorted Containers in stdlib?

2021-11-12 Thread Chris Angelico
On Sat, Nov 13, 2021 at 3:20 AM Steven D'Aprano wrote: > > On Fri, Nov 12, 2021 at 10:07:13AM -0500, Paul Ganssle wrote: > > > I knew about sortedcontainers and I also don't remember ever seeing a > > situation where I needed one or recommended its use. > > We have a very odd situation where

[Python-Dev] Re: Having Sorted Containers in stdlib?

2021-11-12 Thread Steven D'Aprano
On Fri, Nov 12, 2021 at 10:07:13AM -0500, Paul Ganssle wrote: > I knew about sortedcontainers and I also don't remember ever seeing a > situation where I needed one or recommended its use. We have a very odd situation where apparently sortedcontainers is one of the most well-known, popular,

[Python-Dev] Re: Having Sorted Containers in stdlib?

2021-11-12 Thread Paul Ganssle
I think Richard's point was two-fold: People usually don't want or need this kind of thing /except/ when they have some very specific performance requirements, in which case they probably want to also be very specific about the kind of container they are using rather than using an abstract

[Python-Dev] Re: Do we need to remove everything that's deprecated?

2021-11-12 Thread Petr Viktorin
On 12. 11. 21 14:18, Victor Stinner wrote: For me, deprecated functions cause me a lot of thinking when I met them as a Python maintainer and as a Python user. Why is it still there? What is its purpose? Is there a better alternative? It's related to the Chesterton's fence principle. Sometimes,

[Python-Dev] Re: Do we need to remove everything that's deprecated?

2021-11-12 Thread Victor Stinner
For me, deprecated functions cause me a lot of thinking when I met them as a Python maintainer and as a Python user. Why is it still there? What is its purpose? Is there a better alternative? It's related to the Chesterton's fence principle. Sometimes, reading the doc is enough. Sometimes, I have

[Python-Dev] Re: Do we need to remove everything that's deprecated?

2021-11-12 Thread Petr Viktorin
On 12. 11. 21 13:51, Victor Stinner wrote: The current backwards compatibility policy (PEP 387) sets a *minimum* timeline for deprecations and removals -- "deprecation period must last at least two years." About the PEP 387 process and the 3 examples. On Fri, Nov 12, 2021 at 11:58 AM Petr

[Python-Dev] Re: Do we need to remove everything that's deprecated?

2021-11-12 Thread Victor Stinner
> The current backwards compatibility policy (PEP 387) sets a *minimum* > timeline for deprecations and removals -- "deprecation period must last > at least two years." About the PEP 387 process and the 3 examples. On Fri, Nov 12, 2021 at 11:58 AM Petr Viktorin wrote: >AttributeError:

[Python-Dev] Re: Remove asyncore, asynchat and smtpd modules

2021-11-12 Thread Victor Stinner
> > It was decided to start deprecating the asyncore, asynchat and smtpd > > modules in Python 3.6 released in 2016, 5 years ago. Python 3.10 emits > > DeprecationWarning. > > Wait, only Python 3.10? > According to the policy, the warning should be there for *at least* two > releases. (That's a

[Python-Dev] Do we need to remove everything that's deprecated?

2021-11-12 Thread Petr Viktorin
We're rebuilding many popular projects with Python 3.11 alpha, and I see many failures like: AttributeError: module 'configparser' has no attribute 'SafeConfigParser'. Did you mean: 'RawConfigParser'? (bpo-45173) ImportError: cannot import name 'formatargspec' from 'inspect' (bpo-45320)

[Python-Dev] Re: Remove asyncore, asynchat and smtpd modules

2021-11-12 Thread Petr Viktorin
On 11. 11. 21 13:31, Victor Stinner wrote: Hi, The asyncore module is a very old module of the Python stdlib for asynchronous programming, usually to handle network sockets concurrently. It's a common event loop, but its design has many flaws. The asyncio module was added to Python 3.4 with a