Re: When is PEP necessary?

2011-04-23 Thread Steven D'Aprano
On Sat, 23 Apr 2011 17:46:26 +0530, Disc Magnet wrote:

 Is PEP necessary to add a new package to the standard library?

See http://www.python.org/dev/peps/pep-0001/

 
 What if the community just wants to add a new module to an existing
 package?

Just? Adding a new module is a big step.

How do you know the community wants to add a new module, without a PEP? 
The purpose of the PEP is to demonstrate that the community wants the new 
module, and to ensure that there will be people available to maintain 
that module once it is added.

http://www.python.org/dev/peps/pep-0002/


 What if only a new function has to be added to a module in the standard
 library?
 
 What if only a line or two are to be added to a function in the standard
 library?

Trivial changes do not require a PEP.

There is a procedure which is supposed to be followed for backwards-
incompatible changes (described in a PEP, naturally), but for new 
features, generally the package maintainer is free to add them without a 
PEP.



-- 
Steven
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: When is PEP necessary?

2011-04-23 Thread Martin v. Loewis
Am 23.04.2011 14:16, schrieb Disc Magnet:
 Is PEP necessary to add a new package to the standard library?

A PEP is necessary if the proposed change is contentious. If there is
widespread agreement that the change is desirable, no PEP is needed.

 What if the community just wants to add a new module to an existing package?

It depends on many questions: how does the author of the module think
about that addition? If he vetoes it (for example), it doesn't matter
what the community wants. Also, who is going to maintain it? Are there
competing libraries that provide the same feature? etc.

 What if only a new function has to be added to a module in the standard 
 library?

Likewise. Propose to contribute it, and see what happens.

 What if only a line or two are to be added to a function in the
 standard library?

See above. It depends on the two lines. For example, changing the
default source encoding to UTF-8 was a fairly small change, yet
given past discussions, I felt that writing PEP 3120 was necessary.

Regards,
Martin
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: When is PEP necessary?

2011-04-23 Thread Daniel Kluev
On Sat, Apr 23, 2011 at 11:16 PM, Disc Magnet discmag...@gmail.com wrote:
 Is PEP necessary to add a new package to the standard library?
 *skip*

Don't forget that Python is not limited to CPython. Other
implementations need these PEPs to provide compliant packages.
While its not that important for pure-python modules, anything tied to
C-API better be documented, or it becomes a nightmare to keep
non-CPython version having identical interface.

-- 
With best regards,
Daniel Kluev
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: When is PEP necessary?

2011-04-23 Thread Jean-Paul Calderone
On Apr 23, 5:09 pm, Daniel Kluev dan.kl...@gmail.com wrote:
 On Sat, Apr 23, 2011 at 11:16 PM, Disc Magnet discmag...@gmail.com wrote:
  Is PEP necessary to add a new package to the standard library?
  *skip*

 Don't forget that Python is not limited to CPython. Other
 implementations need these PEPs to provide compliant packages.
 While its not that important for pure-python modules, anything tied to
 C-API better be documented, or it becomes a nightmare to keep
 non-CPython version having identical interface.


Unit tests actually serve this purpose much better than do PEPs.

Jean-Paul
-- 
http://mail.python.org/mailman/listinfo/python-list