Re: [Python-Dev] PEP 594: Removing dead batteries from the standard library

2019-05-20 Thread Jeff Kintscher
What replacements are available for NNTP? All I could find was pynntp, 
which had a single release 6 years ago.


https://github.com/greenbender/pynntp

//Jeff

On 5/20/19 2:27 PM, Antoine Pitrou wrote:

NNTP is still quite used (often through GMane, but probably not only) so
I'd question the removal of nntplib.

cgitb used to be used by some Web frameworks in order to format
exceptions.  Perhaps one should check if that's still the case.

If the wave module depends on the audioop module, and if the wave
module is kept in the stdlib, then the audioop module can't be removed.

Removing the crypt module would remove support for system-standard
password files.  I don't understand the rationale.

Regards

Antoine.


On Mon, 20 May 2019 22:15:22 +0200
Christian Heimes  wrote:

Hi,

here is the first version of my PEP 594 to deprecate and eventually remove 
modules from the standard library. The PEP started last year with talk during 
the Python Language Summit 2018, https://lwn.net/Articles/755229/.

The PEP can be confirmed in two stages. I'm not planning any code changes for 
3.8. Instead I only like to document a bunch of modules as deprecated. Active 
deprecation is planned for 3.9 and removal for 3.10. The long deprecation phase 
gives us 3 years to change our minds or handle edge cases, too.

Regards,
Christian



PEP: 594
Title: Removing dead batteries from the standard library
Author: Christian Heimes 
Status: Active
Type: Process
Content-Type: text/x-rst
Created: 20-May-2019
Post-History:


Abstract


This PEP proposed a list of standard library modules to be removed from the
standard library. The modules are mostly historic data formats and APIs that
have been superseded a long time ago, e.g. Mac OS 9 and Commodore.


Rationale
=

Back in the early days of Python, the interpreter came with a large set of
useful modules. This was often refrained to as "batteries included"
philosophy and was one of the corner stones to Python's success story.
Users didn't have to figure out how to download and install separate
packages in order to write a simple web server or parse email.

Times have changed. The introduction of the cheese shop (PyPI), setuptools,
and later pip, it became simple and straight forward to download and install
packages. Nowadays Python has a rich and vibrant ecosystem of third party
packages. It's pretty much standard to either install packages from PyPI or
use one of the many Python or Linux distributions.

On the other hand, Python's standard library is piling up cruft, unnecessary
duplication of functionality, and dispensable features. This is undesirable
for several reasons.

* Any additional module increases the maintenance cost for the Python core
   development team. The team has limited resources, reduced maintenance cost
   frees development time for other improvements.
* Modules in the standard library are generally favored and seen as the
   de-facto solution for a problem. A majority of users only pick 3rd party
   modules to replace a stdlib module, when they have a compelling reason, e.g.
   lxml instead of `xml`. The removal of an unmaintained stdlib module
   increases the chances of a community contributed module to become widely
   used.
* A lean and mean standard library benefits platforms with limited resources
   like devices with just a few hundred kilobyte of storage (e.g. BBC
   Micro:bit). Python on mobile platforms like BeeWare or WebAssembly
   (e.g. pyodide) also benefit from reduced download size.

The modules in the PEP have been selected for deprecation because their
removal is either least controversial or most beneficial. For example
least controversial are 30 years old multimedia formats like ``sunau``
audio format, which was used on SPARC and NeXT workstations in the late
1980ties. The ``crypt`` module has fundamental flaws that are better solved
outside the standard library.

This PEP also designates some modules as not scheduled for removal. Some
modules have been deprecated for several releases or seem unnecessary at
first glance. However it is beneficial to keep the modules in the standard
library, mostly for environments where installing a package from PyPI is not
an option. This can be cooperate environments or class rooms where external
code is not permitted without legal approval.

* The usage of FTP is declining, but some files are still provided over
   the FTP protocol or hosters offer FTP to upload content. Therefore
   ``ftplib`` is going to stay.
* The ``optparse`` and ``getopt`` module are widely used. They are mature
   modules with very low maintenance overhead.
* According to David Beazley [5]_ the ``wave`` module is easy to teach to
   kids and can make crazy sounds. Making a computer generate crazy sounds is
   powerful and highly motivating exercise for a 9yo aspiring developer. It's
   a fun battery to keep.


Deprecation schedule
=

Re: [Python-Dev] PEP 594: Removing dead batteries from the standard library

2019-05-23 Thread Jeff Kintscher

+1

On 5/23/19 1:00 AM, Alex Walters wrote:

I've watched the entire thread and its taken me a few days to put a finger
on what bothers me about it.

In my opinion, this shouldn't be a pep describing the list of modules that
need to go as "dead batteries", but should be a process pep describing how
dead batteries should be removed, and the individual modules should be given
their own pep.  I think reactions to individual module peps will give a
better indication of if it's a used module or not.


-Original Message-
From: Python-Dev  On Behalf Of Christian Heimes
Sent: Monday, May 20, 2019 4:15 PM
To: Python Dev 
Subject: [Python-Dev] PEP 594: Removing dead batteries from the standard
library

Hi,

here is the first version of my PEP 594 to deprecate and eventually remove
modules from the standard library. The PEP started last year with talk

during

the Python Language Summit 2018, https://lwn.net/Articles/755229/.

The PEP can be confirmed in two stages. I'm not planning any code changes
for 3.8. Instead I only like to document a bunch of modules as deprecated.
Active deprecation is planned for 3.9 and removal for 3.10. The long
deprecation phase gives us 3 years to change our minds or handle edge
cases, too.

Regards,
Christian






PEP: 594
Title: Removing dead batteries from the standard library
Author: Christian Heimes 
Status: Active
Type: Process
Content-Type: text/x-rst
Created: 20-May-2019
Post-History:


Abstract


This PEP proposed a list of standard library modules to be removed from

the

standard library. The modules are mostly historic data formats and APIs

that

have been superseded a long time ago, e.g. Mac OS 9 and Commodore.


Rationale
=

Back in the early days of Python, the interpreter came with a large set of
useful modules. This was often refrained to as "batteries included"
philosophy and was one of the corner stones to Python's success story.
Users didn't have to figure out how to download and install separate
packages in order to write a simple web server or parse email.

Times have changed. The introduction of the cheese shop (PyPI),

setuptools,

and later pip, it became simple and straight forward to download and

install

packages. Nowadays Python has a rich and vibrant ecosystem of third party
packages. It's pretty much standard to either install packages from PyPI

or

use one of the many Python or Linux distributions.

On the other hand, Python's standard library is piling up cruft,

unnecessary

duplication of functionality, and dispensable features. This is

undesirable

for several reasons.

* Any additional module increases the maintenance cost for the Python core
   development team. The team has limited resources, reduced maintenance
cost
   frees development time for other improvements.
* Modules in the standard library are generally favored and seen as the
   de-facto solution for a problem. A majority of users only pick 3rd party
   modules to replace a stdlib module, when they have a compelling reason,
e.g.
   lxml instead of `xml`. The removal of an unmaintained stdlib module
   increases the chances of a community contributed module to become
widely
   used.
* A lean and mean standard library benefits platforms with limited

resources

   like devices with just a few hundred kilobyte of storage (e.g. BBC
   Micro:bit). Python on mobile platforms like BeeWare or WebAssembly
   (e.g. pyodide) also benefit from reduced download size.

The modules in the PEP have been selected for deprecation because their
removal is either least controversial or most beneficial. For example
least controversial are 30 years old multimedia formats like ``sunau``
audio format, which was used on SPARC and NeXT workstations in the late
1980ties. The ``crypt`` module has fundamental flaws that are better

solved

outside the standard library.

This PEP also designates some modules as not scheduled for removal. Some
modules have been deprecated for several releases or seem unnecessary at
first glance. However it is beneficial to keep the modules in the standard
library, mostly for environments where installing a package from PyPI is

not

an option. This can be cooperate environments or class rooms where
external
code is not permitted without legal approval.

* The usage of FTP is declining, but some files are still provided over
   the FTP protocol or hosters offer FTP to upload content. Therefore
   ``ftplib`` is going to stay.
* The ``optparse`` and ``getopt`` module are widely used. They are mature
   modules with very low maintenance overhead.
* According to David Beazley [5]_ the ``wave`` module is easy to teach to
   kids and can make crazy sounds. Making a computer generate crazy sounds
is
   powerful and highly motivating exercise for a 9yo aspiring developer.

It's

   a fun battery to keep.


Deprecation schedule


3.8
---

This PEP targets Python 3.8. Ver