Skip to content

Commit d3b94fd

Browse files
Release 24.5 (#74)
* Version of SDK updated * Drop Python 3.5 support. Use Python 3.6 as minimal version * Fix linter errors * Fix warnings in Python 3.6 --------- Co-authored-by: Denis Averin <[email protected]>
1 parent 1540b5a commit d3b94fd

File tree

10 files changed

+19
-24
lines changed

10 files changed

+19
-24
lines changed

.github/workflows/python-latest.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ jobs:
1616
- uses: snok/latest-python-versions@v1
1717
id: get-python-versions-action
1818
with:
19-
min-version: '3.11'
19+
min-version: '3.12'
2020

2121
test:
2222
needs: [get-python-versions]
@@ -42,7 +42,7 @@ jobs:
4242
- name: Lint
4343
run: |
4444
python -m black --line-length=120 --check .
45-
python -m check_python_versions --expect 2.7,3.5- --only setup.py
45+
python -m check_python_versions --expect 2.7,3.6- --only setup.py
4646
- name: Test
4747
env:
4848
TEST_CONFIGURATION_ACCESS_TOKEN: ${{ secrets.TEST_CONFIGURATION_ACCESS_TOKEN }}

.github/workflows/python-package.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ jobs:
1717
strategy:
1818
matrix:
1919
# see https://www.python.org/downloads/
20-
python-version: [ '3.5', '3.12' ]
20+
python-version: [ '3.6', '3.12' ]
2121

2222
steps:
2323
- uses: actions/checkout@v4

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ publish-docker: init-docker unittest dist
5757

5858
.PHONY: test
5959
test:
60-
python -Werror -m pytest --cov=aspose_barcode_cloud tests/
60+
python -m pytest --cov=aspose_barcode_cloud tests/
6161

6262
.PHONY: cover
6363
cover:

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
[![PyPI](https://img.shields.io/pypi/v/aspose-barcode-cloud)](https://pypi.org/project/aspose-barcode-cloud/)
66

77
- API version: 3.0
8-
- Package version: 24.4.0
8+
- Package version: 24.5.0
99

1010
## Demo applications
1111

@@ -21,7 +21,7 @@ This repository contains Aspose.BarCode Cloud SDK for Python source code. This S
2121

2222
Supported Python versions:
2323

24-
- Python 3.5+
24+
- Python 3.6+
2525

2626
To use these SDKs, you will need Client Id and Client Secret which can be looked up at [Aspose Cloud Dashboard](https://dashboard.aspose.cloud/applications) (free registration in Aspose Cloud is required for this).
2727

aspose_barcode_cloud/api_client.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -67,13 +67,13 @@ def __init__(self, configuration=None, header_name=None, header_value=None, cook
6767
self.rest_client = RESTClientObject(configuration)
6868
self.default_headers = {
6969
"x-aspose-client": "python sdk",
70-
"x-aspose-client-version": "24.4.0",
70+
"x-aspose-client-version": "24.5.0",
7171
}
7272
if header_name is not None:
7373
self.default_headers[header_name] = header_value
7474
self.cookie = cookie
7575
# Set default User-Agent.
76-
self.user_agent = "Aspose-Barcode-SDK/24.4.0/python"
76+
self.user_agent = "Aspose-Barcode-SDK/24.5.0/python"
7777

7878
def __del__(self):
7979
self.rest_client.close()
@@ -258,7 +258,7 @@ def __deserialize(self, data, klass):
258258
if data is None:
259259
return None
260260

261-
if type(klass) == str:
261+
if isinstance(klass, str):
262262
if klass.startswith("list["):
263263
sub_kls = re.match(r"list\[(.*)]", klass).group(1)
264264
return [self.__deserialize(sub_data, sub_kls) for sub_data in data]

aspose_barcode_cloud/configuration.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -262,7 +262,7 @@ def to_debug_report(self):
262262
"OS: {env}\n"
263263
"Python Version: {pyversion}\n"
264264
"Version of the API: 3.0\n"
265-
"SDK Package Version: 24.4.0".format(env=sys.platform, pyversion=sys.version)
265+
"SDK Package Version: 24.5.0".format(env=sys.platform, pyversion=sys.version)
266266
)
267267

268268
@staticmethod

aspose_barcode_cloud/rest.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,6 @@ def getheader(self, name, default=None):
4141

4242

4343
class RESTClientObject(object):
44-
4544
def __init__(self, configuration, pools_size=4, maxsize=None):
4645
# urllib3.PoolManager will pass all kw parameters to connectionpool
4746
# https://github.com/shazow/urllib3/blob/f9409436f83aeb79fbaf090181cd81b784f1b8ce/urllib3/poolmanager.py#L75 # noqa: E501
@@ -361,7 +360,6 @@ def close(self):
361360

362361

363362
class ApiException(Exception):
364-
365363
def __init__(self, status=0, reason=None, http_resp=None):
366364
# type: (int, str, RESTResponse) -> None
367365
if http_resp:

pyproject.toml

Lines changed: 0 additions & 4 deletions
This file was deleted.

setup.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
from setuptools import setup, find_packages
66

77
NAME = "aspose-barcode-cloud"
8-
VERSION = "24.4.0"
8+
VERSION = "24.5.0"
99
# To install the library, run the following
1010
#
1111
# python setup.py install
@@ -37,7 +37,6 @@
3737
"Programming Language :: Python :: 2",
3838
"Programming Language :: Python :: 3",
3939
"Programming Language :: Python :: 2.7",
40-
"Programming Language :: Python :: 3.5",
4140
"Programming Language :: Python :: 3.6",
4241
"Programming Language :: Python :: 3.7",
4342
"Programming Language :: Python :: 3.8",

tox.ini

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,20 @@
11
; Use tox version 3.x
2+
; Run particular env:
3+
; python -m tox -e 3.6
24
[tox]
3-
envlist = 2.7, 3.5, 3.12
5+
envlist = 2.7, 3.6, 3.12
46

57
[testenv]
68
passenv = TEST_CONFIGURATION_ACCESS_TOKEN
79
skip_install=True
810
whitelist_externals = docker
911
echo
1012
commands_pre=
11-
docker run --name test-py{envname} -ti -d -v {toxinidir}:/submodules/python -e TEST_CONFIGURATION_ACCESS_TOKEN python:{envname}-buster
12-
docker exec --workdir /submodules/python test-py{envname} python -m pip install -r requirements.txt -r lint-requirements.txt -r test-requirements.txt
13+
docker run --name test-py{envname} -ti -d -v {toxinidir}:/src -e TEST_CONFIGURATION_ACCESS_TOKEN python:{envname}
14+
docker exec --workdir /src test-py{envname} python -m pip install -r requirements.txt -r lint-requirements.txt -r test-requirements.txt
15+
commands=
16+
docker exec -t --workdir /src test-py{envname} python -m pytest --cov=aspose_barcode_cloud tests/
17+
docker exec -t --workdir /src test-py{envname} python -Werror example.py
1318
commands_post=
1419
docker stop test-py{envname}
1520
docker rm test-py{envname}
16-
commands=
17-
docker exec -t --workdir /submodules/python test-py{envname} python -Werror -m pytest --cov=aspose_barcode_cloud tests/
18-
docker exec -t --workdir /submodules/python test-py{envname} python -Werror example.py

0 commit comments

Comments
 (0)