File tree Expand file tree Collapse file tree 3 files changed +10
-8
lines changed
Filter options
Expand file tree Collapse file tree 3 files changed +10
-8
lines changed
Original file line number Diff line number Diff line change 1
1
sudo : false
2
2
language : python
3
+ dist : xenial
3
4
python :
4
5
- " 2.7"
5
6
- " 3.4"
Original file line number Diff line number Diff line change 14
14
zip_safe = False ,
15
15
include_package_data = True ,
16
16
package_data = {'' : ['README.rst' ]},
17
- install_requires = ['ua-parser>=0.4.1 ' ],
17
+ install_requires = ['ua-parser>=0.8.0 ' ],
18
18
classifiers = [
19
19
'Development Status :: 5 - Production/Stable' ,
20
20
'Environment :: Web Environment' ,
Original file line number Diff line number Diff line change 16
16
PC_OS_FAMILIES = (
17
17
'Windows 95' ,
18
18
'Windows 98' ,
19
- 'Windows ME' ,
20
19
'Solaris' ,
21
20
)
22
21
51
50
'iOS' ,
52
51
'Android' ,
53
52
'Windows Phone' ,
54
- 'Windows Phone OS' ,
55
- 'Windows RT' ,
56
53
'Windows CE' ,
57
54
'Windows Mobile' ,
58
55
'Firefox OS' ,
@@ -172,7 +169,7 @@ def is_tablet(self):
172
169
return True
173
170
if (self .os .family == 'Android' and self ._is_android_tablet ()):
174
171
return True
175
- if self .os .family . startswith ('Windows RT' ):
172
+ if self .os .family == 'Windows' and self . os . version_string . startswith ('RT' ):
176
173
return True
177
174
if self .os .family == 'Firefox OS' and 'Mobile' not in self .browser .family :
178
175
return True
@@ -217,16 +214,20 @@ def is_touch_capable(self):
217
214
return True
218
215
if self .device .family in TOUCH_CAPABLE_DEVICE_FAMILIES :
219
216
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
222
222
if 'BlackBerry' in self .os .family and self ._is_blackberry_touch_capable_device ():
223
223
return True
224
224
return False
225
225
226
226
@property
227
227
def is_pc (self ):
228
228
# 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' :
230
231
return True
231
232
# TODO: remove after https://github.com/tobie/ua-parser/issues/127 is closed
232
233
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