Skip to content

Commit 67642d2

Browse files
committed
Merge branch 'release/0.10.0'
2 parents 8fc7f1e + 4812d6d commit 67642d2

28 files changed

+1681
-1295
lines changed

.github/workflows/cd.yml

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ jobs:
3636

3737
strategy:
3838
matrix:
39-
python-version: [2.7, 3.8]
39+
python-version: [3.8]
4040

4141
steps:
4242
- name: Checkout code
@@ -47,13 +47,9 @@ jobs:
4747
with:
4848
python-version: ${{ matrix.python-version }}
4949

50-
- name: Ensure pip version for python 2
50+
- name: Pin pip version
5151
run: |
52-
if [ "${{ matrix.python-version}}" == "2.7" ] ; then
53-
echo "pip_v=pip < 21.0" >> $GITHUB_ENV
54-
else
55-
echo "pip_v=pip" >> $GITHUB_ENV
56-
fi
52+
echo "pip_v=pip" >> $GITHUB_ENV
5753
5854
- name: Build
5955
run: |

.github/workflows/ci.yml

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ jobs:
1212

1313
strategy:
1414
matrix:
15-
python-version: [2.7, 3.6, 3.7, 3.8, 3.9]
15+
python-version: [3.6, 3.7, 3.8, 3.9, "3.10"]
1616
extras-required: [".", ".[redis]"]
1717

1818
services:
@@ -35,13 +35,9 @@ jobs:
3535
with:
3636
python-version: ${{ matrix.python-version }}
3737

38-
- name: Pin pip version for python 2
38+
- name: Pin pip version
3939
run: |
40-
if [ "${{ matrix.python-version}}" == "2.7" ] ; then
41-
echo "pip_v=pip < 21.0" >> $GITHUB_ENV
42-
else
43-
echo "pip_v=pip" >> $GITHUB_ENV
44-
fi
40+
echo "pip_v=pip" >> $GITHUB_ENV
4541
4642
- name: Install dependencies
4743
run: |

CHANGES.txt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
Version 0.10.0 (2021-12-16)
2+
--------------------------
3+
Add Python 3.10 support (#254)
4+
Add configurable timeout for HTTP requests (#258)
5+
16
Version 0.9.1 (2021-10-26)
27
--------------------------
38
Update python versions in run-tests script (#256)

Dockerfile

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
FROM centos:8
2+
3+
RUN yum -y install wget
4+
RUN yum install -y epel-release
5+
RUN yum -y install git tar gcc make bzip2 openssl openssl-devel patch gcc-c++ libffi-devel sqlite-devel
6+
RUN git clone git://github.com/yyuu/pyenv.git ~/.pyenv
7+
ENV HOME /root
8+
ENV PYENV_ROOT $HOME/.pyenv
9+
ENV PATH $PYENV_ROOT/shims:$PYENV_ROOT/bin:$PATH
10+
11+
RUN pyenv install 3.5.10 && pyenv install 3.6.14 && pyenv install 3.7.11 && pyenv install 3.8.11 && pyenv install 3.9.6 && pyenv install 3.10.1
12+
RUN git clone https://github.com/pyenv/pyenv-virtualenv.git ~/.pyenv/plugins/pyenv-virtualenv
13+
14+
WORKDIR /app
15+
COPY . .
16+
RUN [ "./run-tests.sh", "deploy"]
17+
CMD [ "./run-tests.sh", "test"]

README.rst

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,17 @@ Find out more
5858
.. _`Setup Guide`: https://docs.snowplowanalytics.com/docs/collecting-data/collecting-from-own-applications/python-tracker/setup/
5959
.. _`Contributing`: https://github.com/snowplow/snowplow-python-tracker/blob/master/CONTRIBUTING.md
6060

61+
Python Support
62+
##############
63+
64+
+----------------+--------------------------+
65+
| Python version | snowplow-tracker version |
66+
+================+==========================+
67+
| >=3.5 | 0.10.0 |
68+
+----------------+--------------------------+
69+
| 2.7 | 0.9.1 |
70+
+----------------+--------------------------+
71+
6172
Maintainer Quickstart
6273
#######################
6374

requirements-test.txt

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
1-
pytest==4.6.11
2-
attrs==20.3.0
1+
pytest==4.6.11; python_version < '3.10.0'
2+
pytest==6.2.5; python_version >= '3.10.0'
3+
attrs==21.2.0
34
httmock==1.4.0
4-
freezegun==0.3.15
5-
pytest-cov==2.11.1
6-
coveralls==1.11.1
7-
mock==3.0.5; python_version < '3.0'
5+
freezegun==1.1.0
6+
pytest-cov
7+
coveralls==3.3.1
8+
fakeredis==1.7.0

run-tests.sh

Lines changed: 27 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -15,23 +15,6 @@ eval "$(pyenv init -)"
1515
eval "$(pyenv virtualenv-init -)"
1616

1717
function deploy {
18-
# pyenv install 2.7.18
19-
if [ ! -e ~/.pyenv/versions/tracker27 ]; then
20-
pyenv virtualenv 2.7.18 tracker27
21-
pyenv activate tracker27
22-
pip install .
23-
pip install -r requirements-test.txt
24-
source deactivate
25-
fi
26-
27-
if [ ! -e ~/.pyenv/versions/tracker27redis ]; then
28-
pyenv virtualenv 2.7.18 tracker27redis
29-
pyenv activate tracker27redis
30-
pip install .[redis]
31-
pip install -r requirements-test.txt
32-
source deactivate
33-
fi
34-
3518
# pyenv install 3.5.10
3619
if [ ! -e ~/.pyenv/versions/tracker35 ]; then
3720
pyenv virtualenv 3.5.10 tracker35
@@ -116,18 +99,27 @@ function deploy {
11699
pip install -r requirements-test.txt
117100
source deactivate
118101
fi
119-
}
120102

103+
# pyenv install 3.10.1
104+
if [ ! -e ~/.pyenv/versions/tracker310 ]; then
105+
pyenv virtualenv 3.10.1 tracker310
106+
pyenv activate tracker310
107+
pip install .
108+
pip install -r requirements-test.txt
109+
source deactivate
110+
fi
121111

122-
function run_tests {
123-
pyenv activate tracker27
124-
pytest -s
125-
source deactivate
112+
if [ ! -e ~/.pyenv/versions/tracker310redis ]; then
113+
pyenv virtualenv 3.10.1 tracker310redis
114+
pyenv activate tracker310redis
115+
pip install .[redis]
116+
pip install -r requirements-test.txt
117+
source deactivate
118+
fi
119+
}
126120

127-
pyenv activate tracker27redis
128-
pytest -s
129-
source deactivate
130121

122+
function run_tests {
131123
pyenv activate tracker35
132124
pytest
133125
source deactivate
@@ -167,11 +159,17 @@ function run_tests {
167159
pyenv activate tracker39redis
168160
pytest
169161
source deactivate
162+
163+
pyenv activate tracker310
164+
pytest
165+
source deactivate
166+
167+
pyenv activate tracker310redis
168+
pytest
169+
source deactivate
170170
}
171171

172172
function refresh_deploy {
173-
pyenv uninstall -f tracker27
174-
pyenv uninstall -f tracker27redis
175173
pyenv uninstall -f tracker35
176174
pyenv uninstall -f tracker35redis
177175
pyenv uninstall -f tracker36
@@ -182,6 +180,8 @@ function refresh_deploy {
182180
pyenv uninstall -f tracker38redis
183181
pyenv uninstall -f tracker39
184182
pyenv uninstall -f tracker39redis
183+
pyenv uninstall -f tracker310
184+
pyenv uninstall -f tracker310redis
185185
}
186186

187187

setup.py

Lines changed: 5 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@
1919
License: Apache License Version 2.0
2020
"""
2121

22-
2322
#!/usr/bin/env python
2423
# -*- coding: utf-8 -*-
2524

@@ -28,24 +27,22 @@
2827
except ImportError:
2928
from distutils.core import setup
3029

31-
import os
32-
3330
authors_list = [
3431
'Anuj More',
3532
'Alexander Dean',
3633
'Fred Blundun',
3734
'Paul Boocock'
38-
]
35+
]
3936
authors_str = ', '.join(authors_list)
4037

4138
authors_email_list = [
4239
43-
]
40+
]
4441
authors_email_str = ', '.join(authors_email_list)
4542

4643
setup(
4744
name='snowplow-tracker',
48-
version='0.9.1',
45+
version='0.10.0',
4946
author=authors_str,
5047
author_email=authors_email_str,
5148
packages=['snowplow_tracker', 'snowplow_tracker.test', 'snowplow_tracker.redis', 'snowplow_tracker.celery'],
@@ -60,22 +57,19 @@
6057
"Intended Audience :: Developers",
6158
"License :: OSI Approved :: Apache Software License",
6259
"Programming Language :: Python",
63-
"Programming Language :: Python :: 2",
64-
"Programming Language :: Python :: 2.7",
6560
"Programming Language :: Python :: 3",
6661
"Programming Language :: Python :: 3.5",
6762
"Programming Language :: Python :: 3.6",
6863
"Programming Language :: Python :: 3.7",
6964
"Programming Language :: Python :: 3.8",
7065
"Programming Language :: Python :: 3.9",
66+
"Programming Language :: Python :: 3.10",
7167
"Operating System :: OS Independent",
7268
],
7369

7470
install_requires=[
7571
"requests>=2.25.1,<3.0",
76-
"pycontracts>=1.8.12;python_version<'3.0'",
77-
"pycontracts3>=3.0.2;python_version>='3.0'",
78-
"six>=1.9.0,<2.0"
72+
"typing_extensions>=3.7.4"
7973
],
8074

8175
extras_require={

snowplow_tracker/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
from snowplow_tracker.emitters import logger, Emitter, AsyncEmitter
44
from snowplow_tracker.self_describing_json import SelfDescribingJson
55
from snowplow_tracker.tracker import Tracker
6-
from contracts import disable_all as disable_contracts, enable_all as enable_contracts
6+
from snowplow_tracker.contracts import disable_contracts, enable_contracts
77

88
# celery extra
99
from .celery import CeleryEmitter

snowplow_tracker/_version.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@
1919
License: Apache License Version 2.0
2020
"""
2121

22-
23-
__version_info__ = (0, 9, 1)
22+
__version_info__ = (0, 10, 0)
2423
__version__ = ".".join(str(x) for x in __version_info__)
2524
__build_version__ = __version__ + ''

0 commit comments

Comments
 (0)