Skip to content

Commit 7a58e5c

Browse files
committed
python 3 propganda™
Signed-off-by: Kenneth Reitz <me@kennethreitz.org>
1 parent 9a12bb7 commit 7a58e5c

File tree

3 files changed

+35
-1
lines changed

3 files changed

+35
-1
lines changed

docs/_templates/hacks.html

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,34 @@
1+
<!-- Alabaster (krTheme++) Hacks -->
2+
<aside id="python27">
3+
Python 3, the new best practice, is here to stay.
4+
Python 2 will retire in only <time></time> months!
5+
</aside>
6+
7+
<!-- Python 2 Death Clock™ -->
8+
<style type="text/css">
9+
body { margin-top: 4em; }
10+
#python27 {
11+
position: fixed;
12+
top: 0;
13+
left: 0; right: 0;
14+
height: auto;
15+
text-align: center;
16+
color: white;
17+
background-color: black;
18+
font-size: larger;
19+
line-height: 3;
20+
}
21+
22+
</style>
23+
<script src="https://cdnjs.cloudflare.com/ajax/libs/moment.js/2.18.1/moment.min.js"></script>
24+
<script>
25+
var death = new Date('2020-04-12');
26+
27+
var diff = moment.duration(death - moment());
28+
29+
document.querySelector('#python27 time').innerText = (diff.years() * 12) + diff.months();
30+
</script>
31+
132
<script type="text/javascript">
233
var _gauges = _gauges || [];
334
(function() {

docs/conf.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,8 @@
109109
'github_user': 'kennethreitz',
110110
'github_repo': 'python-guide',
111111
'github_banner': True,
112-
'show_related': False
112+
'show_related': False,
113+
'note_bg': '#FFF59C'
113114
}
114115

115116
# Add any paths that contain custom themes here, relative to this directory.

docs/index.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,8 @@ This guide is **opinionated** in a way that is almost, but not quite, entirely
2020
available here. Rather, you'll find a nice concise list of highly recommended
2121
options.
2222

23+
.. note:: The use of **Python 3** is *highly* preferred over Python 2. Consider upgrading your applications and infrastructure if you find yourself *still* using Python 2 in production today. If you are using Python 3, congratulations — you are indeed a person of excellent taste.
24+
—*Kenneth Reitz*
2325

2426
Let's get started! But first, let's make sure you know where your towel is.
2527

0 commit comments

Comments
 (0)