Skip to content

Commit 0e4e91f

Browse files
authored
update awscrt to 0.11.19. Remove support for python3.5 as it's EOL (#194)
- update awscrt to 0.11.19. Remove support for python3.5 as it's EOL - Version and metadata of life updates
1 parent 8b16659 commit 0e4e91f

File tree

6 files changed

+47
-16
lines changed

6 files changed

+47
-16
lines changed

README.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
11
# AWS IoT Device SDK v2 for Python
2+
3+
[![Version](https://img.shields.io/pypi/v/awsiotsdk.svg?style=flat)](https://pypi.org/project/awsiotsdk/)
4+
25
This document provides information about the AWS IoT Device SDK v2 for Python.
36

47
If you have any issues or feature requests, please file an issue or pull request.
@@ -27,7 +30,7 @@ to Python by the `awscrt` package ([PyPI](https://pypi.org/project/awscrt/)) ([G
2730
## Installation
2831

2932
### Minimum Requirements
30-
* Python 3.5+
33+
* Python 3.6+
3134

3235
### Install from PyPI
3336
```

awsiot/__init__.py

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@
1515
import json
1616
from typing import Any, Callable, Dict, Optional, Tuple, TypeVar
1717

18+
__version__ = '1.0.0-dev'
19+
1820
T = TypeVar('T')
1921

2022
PayloadObj = Dict[str, Any]
@@ -30,7 +32,7 @@ class MqttServiceClient:
3032
"""
3133

3234
def __init__(self, mqtt_connection: mqtt.Connection):
33-
self._mqtt_connection = mqtt_connection # type: mqtt.Connection
35+
self._mqtt_connection = mqtt_connection # type: mqtt.Connection
3436

3537
@property
3638
def mqtt_connection(self) -> mqtt.Connection:
@@ -50,7 +52,7 @@ def unsubscribe(self, topic: str) -> Future:
5052
`Future` whose result will be `None` when the server
5153
has acknowledged the unsubscribe.
5254
"""
53-
future = Future() # type: Future
55+
future = Future() # type: Future
5456
try:
5557
def on_unsuback(unsuback_future):
5658
if unsuback_future.exception():
@@ -80,7 +82,7 @@ def _publish_operation(self, topic: str, qos: int, payload: Optional[PayloadObj]
8082
server has acknowledged the message, or an exception if the
8183
publish fails.
8284
"""
83-
future = Future() # type: Future
85+
future = Future() # type: Future
8486
try:
8587
def on_puback(puback_future):
8688
if puback_future.exception():
@@ -135,7 +137,7 @@ def _subscribe_operation(self,
135137
Note that messages may arrive before the subscription is acknowledged.
136138
"""
137139

138-
future = Future() # type: Future
140+
future = Future() # type: Future
139141
try:
140142
def on_suback(suback_future):
141143
try:

builder.json

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,16 @@
2323
},
2424
"manylinux": {
2525
"post_build_steps": [
26+
["echo", "------ Python 3.9 ------"],
27+
["/opt/python/cp39-cp39/bin/python", "-m", "pip", "install", "--upgrade", "pip", "setuptools"],
28+
["/opt/python/cp39-cp39/bin/python", "-m", "pip", "install", ".", "--verbose"],
29+
["/opt/python/cp39-cp39/bin/python", "-m", "pip", "install", "boto3", "autopep8"],
30+
["/opt/python/cp39-cp39/bin/python", "-m", "unittest", "discover", "--verbose"],
31+
["echo", "------ Python 3.8 ------"],
32+
["/opt/python/cp38-cp38/bin/python", "-m", "pip", "install", "--upgrade", "pip", "setuptools"],
33+
["/opt/python/cp38-cp38/bin/python", "-m", "pip", "install", ".", "--verbose"],
34+
["/opt/python/cp38-cp38/bin/python", "-m", "pip", "install", "boto3", "autopep8"],
35+
["/opt/python/cp38-cp38/bin/python", "-m", "unittest", "discover", "--verbose"],
2636
["echo", "------ Python 3.7 ------"],
2737
["/opt/python/cp37-cp37m/bin/python", "-m", "pip", "install", "--upgrade", "pip", "setuptools"],
2838
["/opt/python/cp37-cp37m/bin/python", "-m", "pip", "install", ".", "--verbose"],
@@ -32,12 +42,7 @@
3242
["/opt/python/cp36-cp36m/bin/python", "-m", "pip", "install", "--upgrade", "pip", "setuptools"],
3343
["/opt/python/cp36-cp36m/bin/python", "-m", "pip", "install", ".", "--verbose"],
3444
["/opt/python/cp36-cp36m/bin/python", "-m", "pip", "install", "boto3", "autopep8"],
35-
["/opt/python/cp36-cp36m/bin/python", "-m", "unittest", "discover", "--verbose"],
36-
["echo", "------ Python 3.5 ------"],
37-
["/opt/python/cp35-cp35m/bin/python", "-m", "pip", "install", "--upgrade", "pip", "setuptools"],
38-
["/opt/python/cp35-cp35m/bin/python", "-m", "pip", "install", ".", "--verbose"],
39-
["/opt/python/cp35-cp35m/bin/python", "-m", "pip", "install", "boto3", "autopep8"],
40-
["/opt/python/cp35-cp35m/bin/python", "-m", "unittest", "discover", "--verbose"]
45+
["/opt/python/cp36-cp36m/bin/python", "-m", "unittest", "discover", "--verbose"]
4146
],
4247
"run_tests": false,
4348
"_comment": "manylinux has all its own build steps, turn off 'tests' which is where normal build steps are declared. using data to program sucks"

continuous-delivery/publish_to_prod_pypi.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ phases:
1414
- pypirc=$(aws secretsmanager get-secret-value --secret-id "prod/aws-crt-python/.pypirc" --query "SecretString" | cut -f2 -d\") && echo "$pypirc" > ~/.pypirc
1515
- export PKG_VERSION=$(git describe --tags | cut -f2 -dv)
1616
- echo "Updating package version to ${PKG_VERSION}"
17-
- sed --in-place -E "s/version='.+'/version='${PKG_VERSION}'/" setup.py
17+
- sed --in-place -E "s/__version__ = '.+'/__version__ = '${PKG_VERSION}'/" awsiot/__init__.py
1818
build:
1919
commands:
2020
- echo Build started on `date`

continuous-delivery/publish_to_test_pypi.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ phases:
1414
- cd aws-iot-device-sdk-python-v2
1515
- export PKG_VERSION=$(git describe --tags | cut -f2 -dv)
1616
- echo "Updating package version to ${PKG_VERSION}"
17-
- sed --in-place -E "s/version='.+'/version='${PKG_VERSION}'/" setup.py
17+
- sed --in-place -E "s/__version__ = '.+'/__version__ = '${PKG_VERSION}'/" awsiot/__init__.py
1818
build:
1919
commands:
2020
- echo Build started on `date`

setup.py

Lines changed: 24 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,34 @@
33
# Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
44
# SPDX-License-Identifier: Apache-2.0.
55

6+
import codecs
7+
import re
8+
import os
69
from setuptools import setup, find_packages
710

11+
VERSION_RE = re.compile(r""".*__version__ = ["'](.*?)['"]""", re.S)
12+
PROJECT_DIR = os.path.dirname(os.path.realpath(__file__))
13+
14+
15+
def _load_readme():
16+
readme_path = os.path.join(PROJECT_DIR, 'README.md')
17+
with codecs.open(readme_path, 'r', 'utf-8') as f:
18+
return f.read()
19+
20+
21+
def _load_version():
22+
init_path = os.path.join(PROJECT_DIR, 'awsiot', '__init__.py')
23+
with open(init_path) as fp:
24+
return VERSION_RE.match(fp.read()).group(1)
25+
26+
827
setup(
928
name='awsiotsdk',
10-
version='1.0.0-dev',
29+
version=_load_version(),
1130
license='License :: OSI Approved :: Apache Software License',
1231
description='AWS IoT SDK based on the AWS Common Runtime',
32+
long_description=_load_readme(),
33+
long_description_content_type='text/markdown',
1334
author='AWS SDK Common Runtime Team',
1435
url='https://github.com/aws/aws-iot-device-sdk-python-v2',
1536
packages=find_packages(include=['awsiot*']),
@@ -19,7 +40,7 @@
1940
"Operating System :: OS Independent",
2041
],
2142
install_requires=[
22-
'awscrt==0.11.17',
43+
'awscrt==0.11.19',
2344
],
24-
python_requires='>=3.5',
45+
python_requires='>=3.6',
2546
)

0 commit comments

Comments
 (0)