Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
P
python-ua-parser
Manage
Activity
Members
Labels
Plan
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Debian Python Team
packages
python-ua-parser
Commits
9c7d2049
Commit
9c7d2049
authored
7 years ago
by
Edward Betts
Browse files
Options
Downloads
Patches
Plain Diff
New upstream version 0.8.0
parent
e3a65e4c
Branches
Branches containing commit
Tags
upstream/0.8.0
Tags containing commit
No related merge requests found
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
.travis.yml
+3
-6
3 additions, 6 deletions
.travis.yml
setup.py
+4
-2
4 additions, 2 deletions
setup.py
tox.ini
+3
-3
3 additions, 3 deletions
tox.ini
ua_parser/__init__.py
+1
-1
1 addition, 1 deletion
ua_parser/__init__.py
ua_parser/user_agent_parser.py
+4
-1
4 additions, 1 deletion
ua_parser/user_agent_parser.py
with
15 additions
and
13 deletions
.travis.yml
+
3
−
6
View file @
9c7d2049
sudo
:
false
language
:
python
python
:
-
"
3.
5
"
-
"
3.
6
"
env
:
-
TOX_ENV=py26
-
TOX_ENV=py27
-
TOX_ENV=py33
-
TOX_ENV=py34
-
TOX_ENV=py35
-
TOX_ENV=pypy
-
TOX_ENV=py36
-
TOX_ENV=docs
-
TOX_ENV=py27-flake8
-
TOX_ENV=py3
5
-flake8
-
TOX_ENV=py3
6
-flake8
install
:
-
pip install tox
...
...
This diff is collapsed.
Click to expand it.
setup.py
+
4
−
2
View file @
9c7d2049
...
...
@@ -82,13 +82,14 @@ class build_regexes(Command):
with
open
(
yaml_src
,
'
rb
'
)
as
fp
:
regexes
=
yaml
.
safe_load
(
fp
)
with
open
(
py_dest
,
'
wb
'
)
as
fp
:
fp
.
write
(
b
'
# -*- coding: utf-8 -*-
\n
'
)
fp
.
write
(
b
'
############################################
\n
'
)
fp
.
write
(
b
'
# NOTICE: This file is autogenerated from #
\n
'
)
fp
.
write
(
b
'
# regexes.yaml. Do not edit by hand, #
\n
'
)
fp
.
write
(
b
'
# instead, re-run `setup.py build_regexes` #
\n
'
)
fp
.
write
(
b
'
############################################
\n
'
)
fp
.
write
(
b
'
\n
'
)
fp
.
write
(
b
'
from __future__ import absolute_import
\n
'
)
fp
.
write
(
b
'
from __future__ import absolute_import
, unicode_literals
\n
'
)
fp
.
write
(
b
'
from .user_agent_parser import (
\n
'
)
fp
.
write
(
b
'
UserAgentParser, DeviceParser, OSParser,
\n
'
)
fp
.
write
(
b
'
)
\n
'
)
...
...
@@ -173,7 +174,7 @@ cmdclass = {
setup
(
name
=
'
ua-parser
'
,
version
=
'
0.
7.3
'
,
version
=
'
0.
8.0
'
,
description
=
"
Python port of Browserscope
'
s user agent parser
"
,
author
=
'
PBS
'
,
author_email
=
'
no-reply@pbs.org
'
,
...
...
@@ -203,6 +204,7 @@ setup(
'
Programming Language :: Python :: 3.3
'
,
'
Programming Language :: Python :: 3.4
'
,
'
Programming Language :: Python :: 3.5
'
,
'
Programming Language :: Python :: 3.6
'
,
'
Programming Language :: Python :: Implementation :: CPython
'
,
'
Programming Language :: Python :: Implementation :: PyPy
'
,
],
...
...
This diff is collapsed.
Click to expand it.
tox.ini
+
3
−
3
View file @
9c7d2049
[tox]
envlist
=
py26, py27, py
py, py31, py32, py33, py34, py35
, docs, py27-flake8, py3
5
-flake8
envlist
=
py26, py27, py
36
, docs, py27-flake8, py3
6
-flake8
[testenv]
deps
=
...
...
@@ -19,8 +19,8 @@ basepython = python2.7
deps
=
flake8
commands
=
flake8 {posargs}
[testenv:py3
5
-flake8]
basepython
=
python3.
5
[testenv:py3
6
-flake8]
basepython
=
python3.
6
deps
=
flake8
commands
=
flake8 {posargs}
...
...
This diff is collapsed.
Click to expand it.
ua_parser/__init__.py
+
1
−
1
View file @
9c7d2049
VERSION
=
(
0
,
7
,
3
)
VERSION
=
(
0
,
8
,
0
)
This diff is collapsed.
Click to expand it.
ua_parser/user_agent_parser.py
+
4
−
1
View file @
9c7d2049
...
...
@@ -117,7 +117,10 @@ class OSParser(object):
os
=
match
.
group
(
1
)
if
self
.
os_v1_replacement
:
os_v1
=
self
.
os_v1_replacement
if
re
.
search
(
r
'
\$1
'
,
self
.
os_v1_replacement
):
os_v1
=
re
.
sub
(
r
'
\$1
'
,
match
.
group
(
1
),
self
.
os_v1_replacement
)
else
:
os_v1
=
self
.
os_v1_replacement
elif
match
.
lastindex
and
match
.
lastindex
>=
2
:
os_v1
=
match
.
group
(
2
)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment