File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11sudo : false
22language : python
3+ dist : xenial
34python :
45 - " 2.7"
56 - " 3.4"
Original file line number Diff line number Diff line change 1414 zip_safe = False ,
1515 include_package_data = True ,
1616 package_data = {'' : ['README.rst' ]},
17- install_requires = ['ua-parser>=0.4.1 ' ],
17+ install_requires = ['ua-parser>=0.8.0 ' ],
1818 classifiers = [
1919 'Development Status :: 5 - Production/Stable' ,
2020 'Environment :: Web Environment' ,
Original file line number Diff line number Diff line change 1616PC_OS_FAMILIES = (
1717 'Windows 95' ,
1818 'Windows 98' ,
19- 'Windows ME' ,
2019 'Solaris' ,
2120)
2221
5150 'iOS' ,
5251 'Android' ,
5352 'Windows Phone' ,
54- 'Windows Phone OS' ,
55- 'Windows RT' ,
5653 'Windows CE' ,
5754 'Windows Mobile' ,
5855 'Firefox OS' ,
@@ -172,7 +169,7 @@ def is_tablet(self):
172169 return True
173170 if (self .os .family == 'Android' and self ._is_android_tablet ()):
174171 return True
175- if self .os .family . startswith ('Windows RT' ):
172+ if self .os .family == 'Windows' and self . os . version_string . startswith ('RT' ):
176173 return True
177174 if self .os .family == 'Firefox OS' and 'Mobile' not in self .browser .family :
178175 return True
@@ -217,16 +214,20 @@ def is_touch_capable(self):
217214 return True
218215 if self .device .family in TOUCH_CAPABLE_DEVICE_FAMILIES :
219216 return True
220- if self .os .family .startswith ('Windows 8' ) and 'Touch' in self .ua_string :
221- return True
217+ if self .os .family == 'Windows' :
218+ if self .os .version_string .startswith ('RT' ):
219+ return True
220+ if self .os .version_string .startswith ('8' ) and 'Touch' in self .ua_string :
221+ return True
222222 if 'BlackBerry' in self .os .family and self ._is_blackberry_touch_capable_device ():
223223 return True
224224 return False
225225
226226 @property
227227 def is_pc (self ):
228228 # Returns True for "PC" devices (Windows, Mac and Linux)
229- if 'Windows NT' in self .ua_string or self .os .family in PC_OS_FAMILIES :
229+ if 'Windows NT' in self .ua_string or self .os .family in PC_OS_FAMILIES or \
230+ self .os .family == 'Windows' and self .os .version_string == 'ME' :
230231 return True
231232 # TODO: remove after https://github.com/tobie/ua-parser/issues/127 is closed
232233 if self .os .family == 'Mac OS X' and 'Silk' not in self .ua_string :
You can’t perform that action at this time.
0 commit comments