File tree 2 files changed +12
-7
lines changed
2 files changed +12
-7
lines changed Original file line number Diff line number Diff line change
1
+ The Python 2 end of life warning now only shows on CPython, which is the
2
+ implementation that has announced end of life plans.
Original file line number Diff line number Diff line change 5
5
import logging .config
6
6
import optparse
7
7
import os
8
+ import platform
8
9
import sys
9
10
import traceback
10
11
@@ -145,14 +146,16 @@ def main(self, args):
145
146
gone_in = '19.2' ,
146
147
)
147
148
elif sys .version_info [:2 ] == (2 , 7 ):
148
- deprecated (
149
- "Python 2.7 will reach the end of its life on January 1st, "
150
- "2020. Please upgrade your Python as Python 2.7 won't be "
151
- "maintained after that date. A future version of pip will "
152
- "drop support for Python 2.7." ,
153
- replacement = None ,
154
- gone_in = None ,
149
+ message = (
150
+ "A future version of pip will drop support for Python 2.7."
155
151
)
152
+ if platform .python_implementation () == "CPython" :
153
+ message = (
154
+ "Python 2.7 will reach the end of its life on January "
155
+ "1st, 2020. Please upgrade your Python as Python 2.7 "
156
+ "won't be maintained after that date. "
157
+ ) + message
158
+ deprecated (message , replacement = None , gone_in = None )
156
159
157
160
# TODO: Try to get these passing down from the command?
158
161
# without resorting to os.environ to hold these.
You can’t perform that action at this time.
0 commit comments