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

2021-12-12 Thread Terry Reedy
On 11/18/2021 9:52 AM, Petr Viktorin wrote: On Wed, Nov 17, 2021 at 12:49 AM Terry Reedy wrote: And then there are truly trivial removals like the "failUnless" or "SafeConfigParser" aliases. I don't see a good reason to remove those -- they could stay deprecated forever. This part I do not

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

2021-11-23 Thread Petr Viktorin
On 19. 11. 21 22:15, Mike Miller wrote: This is the point where the pricey support contract comes in.  Would give options to those who need it and provide some revenue. Not really; for a pricey support contract would need to freeze things for even longer -- *and* make it an actual contract

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

2021-11-19 Thread Mike Miller
This is the point where the pricey support contract comes in. Would give options to those who need it and provide some revenue. Otherwise, the "there's no such thing as a free lunch," factor takes precedence. -Mike ___ Python-Dev mailing list --

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

2021-11-18 Thread Petr Viktorin
On Wed, Nov 17, 2021 at 12:49 AM Terry Reedy wrote: > > On 11/16/2021 7:43 AM, Petr Viktorin wrote: > > On 16. 11. 21 1:11, Brett Cannon wrote: > > >> I think the key point with that approach is if you wanted to maximize > >> your support across supported versions, this would mean there wouldn't

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

2021-11-18 Thread Petr Viktorin
On 16. 11. 21 20:13, Brett Cannon wrote: On Tue, Nov 16, 2021 at 4:46 AM Petr Viktorin > wrote: On 16. 11. 21 1:11, Brett Cannon wrote: > > > On Sun, Nov 14, 2021 at 3:01 PM Victor Stinner mailto:vstin...@python.org> >

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

2021-11-18 Thread Victor Stinner
Maybe once a function is deprecated in Python, pyupgrade should be updated? I mean, more collaboration between Python core devs and the pyupgrade development. https://github.com/asottile/pyupgrade Victor On Thu, Nov 18, 2021 at 8:39 AM Jeremiah Paige wrote: > > I’ve seen a few people in this

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

2021-11-17 Thread Jeremiah Paige
I’ve seen a few people in this thread proposing a new tool to automatically update deprecations but I believe it already exists: pyupgrade. Looking over its fixes once again, I don’t think it covers any of the original three deprecations (maybe someone could open a PR?), but it does cover a lot

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

2021-11-16 Thread Terry Reedy
On 11/16/2021 7:43 AM, Petr Viktorin wrote: On 16. 11. 21 1:11, Brett Cannon wrote: I think the key point with that approach is if you wanted to maximize your support across supported versions, this would mean there wouldn't be transition code except when the SC approves of a shorter

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

2021-11-16 Thread Brett Cannon
On Tue, Nov 16, 2021 at 4:46 AM Petr Viktorin wrote: > On 16. 11. 21 1:11, Brett Cannon wrote: > > > > > > On Sun, Nov 14, 2021 at 3:01 PM Victor Stinner > > wrote: > > > > On Sun, Nov 14, 2021 at 6:34 PM Eric V. Smith > > wrote: >

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

2021-11-16 Thread zhouwenbonwpu
Maybe we can provide those deprecated things, but it need people add them manually and dynamically. By this, python can partially support other version python by provided minimum set instead of create a virtual evironment. For example, a big project use "SafeConfigParser" in it, to not change

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

2021-11-16 Thread Petr Viktorin
On 16. 11. 21 1:11, Brett Cannon wrote: On Sun, Nov 14, 2021 at 3:01 PM Victor Stinner > wrote: On Sun, Nov 14, 2021 at 6:34 PM Eric V. Smith mailto:e...@trueblade.com>> wrote: > On second thought, I guess the existing policy already does this. Maybe

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

2021-11-15 Thread Brett Cannon
On Sun, Nov 14, 2021 at 3:01 PM Victor Stinner wrote: > On Sun, Nov 14, 2021 at 6:34 PM Eric V. Smith wrote: > > On second thought, I guess the existing policy already does this. Maybe > > we should make it more than 2 versions for deprecations? I've written > > libraries where I support 4 or 5

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

2021-11-14 Thread Christopher Barker
On Sun, Nov 14, 2021 at 10:06 PM Stephen J. Turnbull < stephenjturnb...@gmail.com> wrote: > I'm not saying *Python* can't remove anything. I'm saying downstream, > *GNU Mailman* has users it *may* want to support. > So a project (not to pick on Mailman) may want to support its users running old

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

2021-11-14 Thread Stephen J. Turnbull
Christopher Barker writes: > On Sun, Nov 14, 2021 at 8:19 AM Stephen J. Turnbull < > stephenjturnb...@gmail.com> wrote: > > > > But do > > > we need to support running the same code on 3.5 to 3.10? > > > > Need? No. Want to not raise a big middle finger to our users? > > Note that I

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

2021-11-14 Thread Inada Naoki
On Mon, Nov 15, 2021 at 7:58 AM Victor Stinner wrote: > > On Sun, Nov 14, 2021 at 6:34 PM Eric V. Smith wrote: > > On second thought, I guess the existing policy already does this. Maybe > > we should make it more than 2 versions for deprecations? I've written > > libraries where I support 4 or

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

2021-11-14 Thread Victor Stinner
On Sun, Nov 14, 2021 at 6:34 PM Eric V. Smith wrote: > On second thought, I guess the existing policy already does this. Maybe > we should make it more than 2 versions for deprecations? I've written > libraries where I support 4 or 5 released versions. Although maybe I > should just trim that

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

2021-11-14 Thread Christopher Barker
On Sun, Nov 14, 2021 at 8:19 AM Stephen J. Turnbull < stephenjturnb...@gmail.com> wrote: > > But do > > we need to support running the same code on 3.5 to 3.10? > > Need? No. Want to not raise a big middle finger to our users? Note that I said 3.5, not 3.6 -- 3.5 is no longer supported. If

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

2021-11-14 Thread Eric V. Smith
On 11/14/2021 11:39 AM, Eric V. Smith wrote: For things that really are removed (and I won't get in to the reasons for why something must be removed), I think a useful stance is "we won't remove anything that would make it hard to support a single code base across all supported python

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

2021-11-14 Thread Eric V. Smith
On 11/12/2021 5:55 AM, Petr Viktorin wrote: If deprecation now means "we've come up with a new way to do things, and you have two years to switch", can we have something else that means "there's now a better way to do things; the old way is a bit worse but continues to work as before"? I

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

2021-11-14 Thread Stephen J. Turnbull
Christopher Barker writes: > On Sat, Nov 13, 2021 at 12:01 AM Stephen J. Turnbull > > > What I think would make a difference is a six-like tool for making > > "easy changes" like substituting aliases and maybe marking other stuff > > that requires human brains to make the right changes. >

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

2021-11-13 Thread Christopher Barker
On Sat, Nov 13, 2021 at 12:01 AM Stephen J. Turnbull > What I think would make a difference is a six-like tool for making > "easy changes" like substituting aliases and maybe marking other stuff > that requires human brains to make the right changes. I think a “2to3” like or “futurize” like

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

2021-11-13 Thread Stephen J. Turnbull
Victor Stinner writes: > In Python, usually, there is a better alternative. As in life. > Do you have to repeat "You should check for DeprecationWarning in > your code" in every "What's New in Python X.Y?" document? That probably doesn't hurt, but I doubt it does much good for anybody

[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: 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] 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: