File tree Expand file tree Collapse file tree 1 file changed +18
-0
lines changed
Expand file tree Collapse file tree 1 file changed +18
-0
lines changed Original file line number Diff line number Diff line change 77Copyright (C) 2017
88"""
99
10+ from __future__ import print_function
11+
1012try :
1113 import simplejson as json
1214except ImportError :
@@ -109,6 +111,22 @@ def enable_debug_mode(vk_session, print_content=False):
109111
110112 import requests
111113
114+ from . import __version__
115+
116+ pypi_version = requests .get (
117+ 'https://pypi.python.org/pypi/vk_api/json'
118+ ).json ()['info' ]['version' ]
119+
120+ if __version__ != pypi_version :
121+ print ()
122+ print ('######### MODULE IS NOT UPDATED!!1 ##########' )
123+ print ()
124+ print ('Installed vk_api version is:' , __version__ )
125+ print ('PyPI vk_api version is:' , pypi_version )
126+ print ()
127+ print ('######### MODULE IS NOT UPDATED!!1 ##########' )
128+ print ()
129+
112130 class DebugHTTPAdapter (requests .adapters .HTTPAdapter ):
113131 def send (self , request , ** kwargs ):
114132 start = time .time ()
You can’t perform that action at this time.
0 commit comments