[Python-Dev] PEP: Consolidating names in the `unittest` module

Ben Finney ben+python at benfinney.id.au
Wed Jul 16 15:12:03 CEST 2008

"M.-A. Lemburg" <mal at egenix.com> writes:

> On 2008-07-16 14:02, Michael Foord wrote:
> > M.-A. Lemburg wrote:
> >> Note that PEP 4 targets deprecating use of whole modules, not
> >> single APIs, or - like in your case - more or less the complete
> >> existing API of a module.
> >
> > Which PEP is usually referenced for the deprecation of individual
> > APIs?
> PEP 5 could be used for that.

That seems an even worse fit; it speaks of changing language features,
not library modules. At least PEP 4 talks about when to raise

> Adding several 10s of deprecation warnings to the unittest module is
> not going to make life easier for anyone. Adding just a single one
> on import and following PEP 4 is.

I don't see how the first "is not going to make life easier" if the
second somehow is. Is a programmer going to be helpless in the face of
some DeprecationWarnings but not others?

> If you do want to apply major changes to a module without changing
> the name, then this could be done as part of the 2.x -> 3.x
> transition.

This has already been rejected

I'm inclined to agree that it's not right for 2.x. I'll revise the PEP

 \     “First they came for the verbs, and I said nothing, for verbing |
  `\    weirds language. Then, they arrival for the nouns and I speech |
_o__)                           nothing, for I no verbs.” —Peter Ellis |
Ben Finney

More information about the Python-Dev mailing list