This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: Docs: mark deprecated items in the TOC
Type: enhancement Stage:
Components: Documentation Versions: Python 3.11
process
Status: open Resolution:
Dependencies: Superseder:
Assigned To: docs@python Nosy List: docs@python, ezio.melotti, georg.brandl, zearin
Priority: normal Keywords:

Created on 2014-01-25 21:29 by zearin, last changed 2022-04-11 14:57 by admin.

Messages (2)
msg209239 - (view) Author: Zearin (zearin) Date: 2014-01-25 21:29
When exploring the docs for the standard library, it’s frustrating to have an idea and look for the answer only to find out that an entire module (or package) has been deprecated _after_ I click on it. 

Can we have links to deprecated items on the Standard Library’s TOC page flagged?  

I see you’re using multiple CSS classes on some links.  I propose: 

- add a CSS class to flag links to deprecated items
- use something like the following CSS


----

/*
 * Example 1: color 
 */
.toctree-wrapper a.deprecated {
    color: #933;
}

/* 
 * Example 2: "badge" 
 */
.toctree-wrapper a.deprecated:after {
	display: inline-block;
    content: "deprecated";
	margin: 0 1em;
	padding: 0 1ex !important;
	border-radius: 			1ex !important;
    
	font-size: x-small;
    
	background-color: #f66;
    color: #933;
}

----

Of course, since the CSS class '.deprecated' already exists, there's 2 options: 

1. the examples above are rewritten to use a different classname, or 
2. add the following CSS:

----

/* "Reset" .deprecated in a toctree context */
.toctree-wrapper a.deprecated {
    background: none;
	border: none;
	padding: 0;
}

/* << insert above example CSS here >> */

----
msg211282 - (view) Author: Ezio Melotti (ezio.melotti) * (Python committer) Date: 2014-02-15 15:47
Are you talking about http://docs.python.org/3/library/index.html ?
That might work for whole modules, but not for classes/methods/functions.
An easy fix for modules would be to add (deprecated) right in the title so that it's visible in the index and also in the Google results (and doesn't require changes in the CSS).
History
Date User Action Args
2022-04-11 14:57:57adminsetgithub: 64592
2021-06-02 14:16:45iritkatrielsetversions: + Python 3.11, - Python 2.7, Python 3.3, Python 3.4, Python 3.5
2014-02-15 15:47:43ezio.melottisetnosy: + ezio.melotti

messages: + msg211282
versions: - Python 3.1, Python 3.2
2014-01-25 21:33:59serhiy.storchakasetnosy: + georg.brandl
2014-01-25 21:29:29zearincreate