Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #60182 > unrolled thread
| Started by | Ben Finney <ben+python@benfinney.id.au> |
|---|---|
| First post | 2013-11-22 10:56 +1100 |
| Last post | 2013-11-22 10:56 +1100 |
| Articles | 1 — 1 participant |
Back to article view | Back to comp.lang.python
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
Re: how to deal with deprecating API functionality in python module? Ben Finney <ben+python@benfinney.id.au> - 2013-11-22 10:56 +1100
| From | Ben Finney <ben+python@benfinney.id.au> |
|---|---|
| Date | 2013-11-22 10:56 +1100 |
| Subject | Re: how to deal with deprecating API functionality in python module? |
| Message-ID | <mailman.3019.1385078233.18130.python-list@python.org> |
Chris Angelico <rosuav@gmail.com> writes: > 1) Keep deprecated APIs around for as long as you can, even if they're > implemented messily on top of your current API. > > 2) Design your API with future-proofing in mind. 2.1) Have a generous deprecation schedule, and go to significant lengths to ensure all developers using your library are aware of the schedule. The PEP 4 <URL:http://www.python.org/dev/peps/pep-0004/> procedure for deprecating Python standard library modules is a good example. 2.2) The schedule needs to spread over several versions; allow the impending removal of the feature to be preceded by staged deprecation. Use warnings (especially DeprecationWarning) to increase awareness of the removal, and to gradually increase the effort needed to continue using the feature anyway as its removal gets closer. -- \ “That's all very good in practice, but how does it work in | `\ *theory*?” —anonymous | _o__) | Ben Finney
Back to top | Article view | comp.lang.python
csiph-web