Fixes #3187 - Update Python dependencies#3191
Conversation
| self.assertEqual(get_browser_name(FIREFOX_MOBILE_UA_OLD), | ||
| 'firefox mobile') | ||
| self.assertEqual(get_browser_name(FIREFOX_TABLET_UA), | ||
| 'firefox mobile (tablet)') |
There was a problem hiding this comment.
We should probably figure out why this changed, and if we care.
There was a problem hiding this comment.
FIREFOX_TABLET_UA = 'Mozilla/5.0 (Android 4.4; Tablet; rv:41.0) Gecko/41.0 Firefox/41.0' # noqawhich is definitely a tablet. I'm not sure why we get firefox mobile (tablet) instead of just firefox tablet but that's probably a separate issue.
webcompat.com/webcompat/helpers.py
Lines 162 to 172 in 94911bc
ok
return get_browser(user_agent_string).rsplit(' ', 1)[0].lower()Let's go see what get_browser returns.
webcompat.com/webcompat/helpers.py
Lines 139 to 159 in 94911bc
- UA parser: 0.8
{
'user_agent': {
'family': 'Firefox Mobile',
'major': '41',
'minor': '0',
'patch': None
},
'os': {
'family': 'Android',
'major': '4',
'minor': '4',
'patch': None,
'patch_minor': None
},
'device': {
'family': 'Generic Tablet',
'brand': 'Generic',
'model': 'Tablet'
},
'string': 'Mozilla/5.0 (Android 4.4; Tablet; rv:41.0) Gecko/41.0 Firefox/41.0'
}- UA parser: 0.9
{
'user_agent': {
'family': 'Firefox Mobile',
'major': '41',
'minor': '0',
'patch': None
},
'os': {
'family': 'Android',
'major': '4',
'minor': '4',
'patch': None,
'patch_minor': None
},
'device': {
'family': 'rv:41.0',
'brand': 'Generic_Android',
'model': 'rv:41.0'
},
'string': 'Mozilla/5.0 (Android 4.4; Tablet; rv:41.0) Gecko/41.0 Firefox/41.0'
}Yoohoo… that device is wow… Probably a bug in user_agent_parser.Parse(user_agent_string)
We could freeze to 0.8 then file a bug on the project. and when they fix it we can upgrade.
There was a problem hiding this comment.
https://github.com/ua-parser/uap-python/issues, I'll check today if i can do a pull request on ua_parser
There was a problem hiding this comment.
opened
Issue: ua-parser/uap-core#461
PR: ua-parser/uap-core#462
config/requirements-dev.txt
Outdated
| # This is for dev purpose | ||
| -r requirements.txt | ||
| mock==3.0.5 | ||
| mock==4.0.1 |
karlcow
left a comment
There was a problem hiding this comment.
@miketaylr a couple of things to adjust.
Thanks for doing the updates.
| self.assertEqual(get_browser_name(FIREFOX_MOBILE_UA_OLD), | ||
| 'firefox mobile') | ||
| self.assertEqual(get_browser_name(FIREFOX_TABLET_UA), | ||
| 'firefox mobile (tablet)') |
There was a problem hiding this comment.
FIREFOX_TABLET_UA = 'Mozilla/5.0 (Android 4.4; Tablet; rv:41.0) Gecko/41.0 Firefox/41.0' # noqawhich is definitely a tablet. I'm not sure why we get firefox mobile (tablet) instead of just firefox tablet but that's probably a separate issue.
webcompat.com/webcompat/helpers.py
Lines 162 to 172 in 94911bc
ok
return get_browser(user_agent_string).rsplit(' ', 1)[0].lower()Let's go see what get_browser returns.
webcompat.com/webcompat/helpers.py
Lines 139 to 159 in 94911bc
- UA parser: 0.8
{
'user_agent': {
'family': 'Firefox Mobile',
'major': '41',
'minor': '0',
'patch': None
},
'os': {
'family': 'Android',
'major': '4',
'minor': '4',
'patch': None,
'patch_minor': None
},
'device': {
'family': 'Generic Tablet',
'brand': 'Generic',
'model': 'Tablet'
},
'string': 'Mozilla/5.0 (Android 4.4; Tablet; rv:41.0) Gecko/41.0 Firefox/41.0'
}- UA parser: 0.9
{
'user_agent': {
'family': 'Firefox Mobile',
'major': '41',
'minor': '0',
'patch': None
},
'os': {
'family': 'Android',
'major': '4',
'minor': '4',
'patch': None,
'patch_minor': None
},
'device': {
'family': 'rv:41.0',
'brand': 'Generic_Android',
'model': 'rv:41.0'
},
'string': 'Mozilla/5.0 (Android 4.4; Tablet; rv:41.0) Gecko/41.0 Firefox/41.0'
}Yoohoo… that device is wow… Probably a bug in user_agent_parser.Parse(user_agent_string)
We could freeze to 0.8 then file a bug on the project. and when they fix it we can upgrade.
| self.assertEqual(get_browser_name(FIREFOX_MOBILE_UA_OLD), | ||
| 'firefox mobile') | ||
| self.assertEqual(get_browser_name(FIREFOX_TABLET_UA), | ||
| 'firefox mobile (tablet)') |
There was a problem hiding this comment.
https://github.com/ua-parser/uap-python/issues, I'll check today if i can do a pull request on ua_parser
| self.assertEqual(get_browser_name(FIREFOX_MOBILE_UA_OLD), | ||
| 'firefox mobile') | ||
| self.assertEqual(get_browser_name(FIREFOX_TABLET_UA), | ||
| 'firefox mobile (tablet)') |
|
I guess we would probably want to freeze the uap module, so to not introduce a regression. Thanks for filing a bug, @karlcow |
|
Ah, I forgot to |
d494dad to
dc5d08c
Compare
yes. :) |
ua-parser/uap-core@v0.6.4...master Probably changes relative to kaiOS |
|
OK, ready to land now that v24.0.0 is shipping to production. |
Let's not land this before landing the current big batch of changes.