Page MenuHomePhabricator

Debian package for ua parser latest version
Closed, ResolvedPublic5 Estimated Story Points

Description

0.7.2 would work.

Event Timeline

Newest code for eventloggimg will parse incoming user agent thus ua-praser is needed as part of EL install

Ottomata set the point value for this task to 3.

Re-opening. The version we have imported of ua-parser is missing a file:

File "/usr/lib/python2.7/dist-packages/ua_parser/user_agent_parser.py", line 549, in <module>
  from ._regexes import USER_AGENT_PARSERS, DEVICE_PARSERS, OS_PARSERS

ImportError: No module named _regexes

If I download ua-parser package i indeed see this regexes file:
ua-parser-0.7.3.tar.gz includes _regexes.py

Nuria moved this task from Done to In Progress on the Analytics-Kanban board.

Change 336712 had a related patch set uploaded (by Ottomata):
Fix for missing _regexes.py, release 0.7.2-2

https://gerrit.wikimedia.org/r/336712

OoOK!

In [5]: from ua_parser import user_agent_parser

In [6]:

That was tricky. Upstream's setup.py fails silently if .git does not exist when building _regexes.py. We use pbuilder/cowbuilder to build packages on copper, and this exports the package to a chroot without any .git directory. I fixed this with a build time patch to setup.py. Also I had to add an option to gbp.conf to tell it to include the uap-core git-submodule in the .orig tarball.

Yuck! We should probably submit a pull request to fix this upstream.

Change 336712 abandoned by Ottomata:
Fix for missing _regexes.py, release 0.7.2-2

https://gerrit.wikimedia.org/r/336712

Change 336722 had a related patch set uploaded (by Ottomata):
Fix for missing _regexes.py, release 0.7.2-2

https://gerrit.wikimedia.org/r/336722

Change 336722 merged by Ottomata:
Fix for missing _regexes.py, release 0.7.2-2

https://gerrit.wikimedia.org/r/336722

Ottomata changed the point value for this task from 3 to 5.