Skip to content

Commit 6827a1c

Browse files
authored
allow python 3.5 minimally (#119)
* allow python 3.5 minimally * Update .travis.yml
1 parent 25aecfe commit 6827a1c

File tree

8 files changed

+16
-10
lines changed

8 files changed

+16
-10
lines changed

.travis.yml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ jobs:
66
include:
77
- stage: test
88
name: 'Run python tests '
9-
python: 3.8
9+
python: 3.5
1010
install: pip install -U tox-travis
1111
script: tox
1212
- python: 3.6
@@ -15,12 +15,14 @@ jobs:
1515
- python: 3.7
1616
install: pip install -U tox-travis
1717
script: tox
18+
- python: 3.8
19+
install: pip install -U tox-travis
20+
script: tox
1821
- python: 3.8
1922
install:
2023
- pip install ./
2124
script: python scripts/validate_my_definition.py -d alsdkdefs/apis/assets_query/
22-
- stage: test_other_os
23-
language: sh
25+
- language: sh
2426
python: 3
2527
before_install:
2628
- choco install python3

alsdkdefs/__init__.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
# -*- coding: future_fstrings -*-
12
import os
23
from os.path import join as pjoin
34
import glob

requirements.txt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
jsonschema[format_nongpl]==3.2.0
22
pyyaml==5.1.2
3-
requests>=2.18
3+
requests>=2.18
4+
future_fstrings

scripts/validate_my_definition.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
#!/usr/bin/env python3
2+
# -*- coding: future_fstrings -*-
23

34
from yaml import YAMLError
45
from jsonschema.exceptions import ValidationError, RefResolutionError
@@ -8,7 +9,6 @@
89
import alsdkdefs
910
import os
1011

11-
1212
def validate_definition(definition_file):
1313
print(f"Validating {definition_file}")
1414
try:

scripts/validate_my_definition.sh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@ elif command -v python3.7; then
99
PYTHON=python3.7
1010
elif command -v python3.6; then
1111
PYTHON=python3.6
12+
elif command -v python3.5; then
13+
PYTHON=python3.5
1214
elif command -v python3; then
1315
PYTHON=python3
1416
else

setup.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
with open('README.md') as readme_file:
44
readme = readme_file.read()
55

6-
requirements = ['jsonschema[format_nongpl]==3.2.0', 'pyyaml==5.1.2', 'requests>=2.18']
6+
requirements = ['jsonschema[format_nongpl]==3.2.0', 'pyyaml==5.1.2', 'requests>=2.18', 'future_fstrings']
77

88
setup(
99
name='alertlogic-sdk-definitions',
@@ -13,7 +13,7 @@
1313
license='MIT license',
1414
author='Alert Logic Inc.',
1515
author_email='[email protected]',
16-
python_requires='>=3.6',
16+
python_requires='>=3.5',
1717
classifiers=[
1818
'Development Status :: 3 - Alpha',
1919
'Intended Audience :: Developers',
@@ -27,8 +27,6 @@
2727
long_description=readme,
2828
long_description_content_type='text/markdown',
2929
scripts=[],
30-
# yeah yeah i know, circular dependency, but we need it for test now, later i'll think how to decouple
31-
# definitions parsing/loading and client
3230
tests_require=requirements,
3331
packages=find_packages(exclude=['contrib', 'docs', 'tests*', 'troubleshooting']),
3432
include_package_data=True,

tests/test_apis_validate.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
#!/usr/bin/env python
2+
# -*- coding: future_fstrings -*-
23
"""Tests for `alertlogic-sdk-definitions` package."""
34

45
import unittest
56
import alsdkdefs
67

7-
88
class TestServiceDefs(unittest.TestCase):
99
def setUp(self):
1010
"""Setup"""

tox.ini

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,14 @@ python =
66
3.8: py38
77
3.7: py37
88
3.6: py36
9+
3.5: py35
910

1011
[testenv]
1112
deps =
1213
requests
1314
PyYaml
1415
jsonschema
16+
future_fstrings
1517
setenv =
1618
PYTHONPATH = {toxinidir}
1719

0 commit comments

Comments
 (0)