Deprecation and the end of life
Last updated
Every feature, and every system, eventually ends. People rely on things in ways their makers never knew, so how something ends matters as much as how it started. In this lesson you'll retire one of Pila's features over six months, see how the Python language ended Python 2 over more than a decade, and decide what happens to patients' data when Pila itself is switched off.
By the end of this lesson you can
- Plan a deprecation with notice, a timeline and a replacement
- Explain how a long end of life, like Python 2’s, gives users time to move
- Decide what to do with personal data when a system is retired
Deprecated, then removed
To deprecate something is to announce that it still works for now but will be removed, so people should move off it. It's a warning period, and the end comes later, on a date people can plan for. A good deprecation has:
- A reason people can understand.
- A replacement, ready before the warning starts.
- A date, announced well ahead.
- Warnings where users will see them, and help for those who can't move by themselves.
- Measurement: who still uses it, so the last users aren't forgotten.
Semantic versioning (lesson 7.4) fits around this: deprecating is a minor release, because nothing breaks yet; removing is a major one.
Retiring a Pila feature
- January Announce Plan
Python 2’s long goodbye
Python itself went through this, on a much bigger scale. Python 3 came out in 2008, with changes that meant Python 2 programs often needed work to run on it.
| When | What happened |
|---|---|
| 2008 | Python 3.0 released. Python 2 still supported |
| 2010 | Python 2.7, the last version of Python 2, released |
| 2014 | End of life, first set for 2015, moved to 2020 to give users more time (PEP 373) |
| 1 Jan 2020 | Python 2 reaches end of life: no more fixes, even for security problems |
| April 2020 | The final release, 2.7.18 |
Over ten years of overlap, and still some organisations were caught out. End of life means more than “old”: when a security hole is found, nobody will fix it. Running end-of-life software is a risk that grows every month, and adaptive maintenance (lesson 8.1) includes moving off it in time.
When Pila itself ends
In its seventh year, the province launches a regional health system and Pila is retired. The code can simply stop. The patients' data needs decisions.
The Data Privacy Act says personal information should be kept only for as long as it's needed for the purpose it was collected for, or as a law requires, and then disposed of securely. Health information is sensitive personal information, so it needs extra care. Decide for each kind of data:
0 of 6 placed right
Patients’ upcoming vaccination dates
Phone numbers of patients who last visited three years ago
Monthly counts of patients per barangay, with no names or numbers
Today’s and past queue tickets with phone numbers
Records the city must keep for an audit by law, for a fixed period
Old backups of the database
Spot the trap: switched off with no notice
The old SMS gateway costs money every month and only Pila’s reminder texts use it. Jun plans to cancel it on Friday. “The reminders are a minor feature,” he says.
What happens if…
Check what you learned
Sources
Every claim on this page comes from these sources: the standard, the founding text of a method, a study, or the official record of a project, from the body that publishes it. Industry reports are labelled as such.
- PEP 373: Python 2.7 Release Schedule: the end-of-life dates for Python 2.7
- Python Software Foundation: Sunsetting Python 2: why, and what it means for users
- Semantic Versioning 2.0.0: its FAQ on deprecating functionality
- National Privacy Commission: Data Privacy Act of 2012: keeping personal data only as long as needed
- Republic Act No. 10173 (The LawPhil Project): the full text of the Act