Skip to content

Commit f983e09

Browse files
authored
Test on python 3.9 (#407)
* 💄 fix jumping jinja2_fsloader problem. fix #367 * 🎉 test on python 3.9. thanks for fixing #364 and pr #404 * 🎉 github action for python 3.9 * 💚 update rua yaml version for 3.9 * This is an auto-commit, updating project meta data, such as changelog.rst, contributors.rst * 💚 add rua yaml for python 3.6 * This is an auto-commit, updating project meta data, such as changelog.rst, contributors.rst * 💄 update yaml style * 💚 update github action Co-authored-by: chfw <[email protected]>
1 parent 0f6b38f commit f983e09

File tree

9 files changed

+16
-11
lines changed

9 files changed

+16
-11
lines changed

.github/workflows/pythonpackage.yml

+4-5
Original file line numberDiff line numberDiff line change
@@ -9,17 +9,16 @@ jobs:
99
strategy:
1010
max-parallel: 4
1111
matrix:
12-
python-version: [3.6, 3.7, 3.8]
12+
python-version: [3.6, 3.7, 3.8, 3.9-dev]
1313

1414
steps:
15-
- uses: actions/checkout@v1
16-
- name: Set up Python ${{ matrix.python-version }}
17-
uses: actions/setup-python@v1
15+
- uses: actions/checkout@v2
16+
- uses: actions/[email protected]
1817
with:
1918
python-version: ${{ matrix.python-version }}
2019
- name: Install dependencies
2120
run: |
22-
python -m pip install --upgrade pip
21+
python -m pip install --upgrade pip setuptools
2322
pip install -r requirements.txt
2423
- name: Lint with flake8
2524
run: |

.isort.cfg

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
line_length=79
33
# Ignore generated files
44
skip=setup.py, moban/__init__.py
5-
known_third_party=fs, lml, crayons, jinja2, ruamel.yaml, mock, pytest
5+
known_third_party=fs, lml, crayons, jinja2, ruamel.yaml, pytest, jinja2_fsloader
66
indent=' '
77
multi_line_output=3
88
length_sort=1

.moban.cd/moban.yml

+2-1
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,10 @@ keywords:
1818
- jinja2
1919
- moban
2020
dependencies:
21+
- ruamel.yaml>=0.15.5;python_version == '3.6'
2122
- ruamel.yaml>=0.15.42;python_version == '3.7'
22-
- ruamel.yaml>=0.15.5;python_version != '3.4' and python_version < '3.7'
2323
- ruamel.yaml>=0.15.98;python_version == '3.8'
24+
- ruamel.yaml>=0.15.98;python_version == '3.9'
2425
- jinja2>=2.7.1
2526
- lml>=0.0.9
2627
- appdirs>=1.4.3

.moban.d/moban_travis.yml.jj2

+1
Original file line numberDiff line numberDiff line change
@@ -10,4 +10,5 @@ python:
1010
- 3.7
1111
- 3.6
1212
- 3.8
13+
- 3.9-dev
1314
{%endblock%}

.travis.yml

+1
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ python:
77
- 3.7
88
- 3.6
99
- 3.8
10+
- 3.9-dev
1011
env:
1112
- MINREQ=1
1213

min_requirements.txt

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
1+
ruamel.yaml==0.15.5;python_version == '3.6'
12
ruamel.yaml==0.15.42;python_version == '3.7'
2-
ruamel.yaml==0.15.5;python_version != '3.4' and python_version < '3.7'
33
ruamel.yaml==0.15.98;python_version == '3.8'
4+
ruamel.yaml==0.15.98;python_version == '3.9'
45
jinja2==2.7.1
56
lml==0.0.9
67
appdirs==1.4.3

moban/plugins/jinja2/engine.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,10 @@
77
from jinja2 import Environment
88
from lml.loader import scan_plugins_regex
99
from lml.plugin import PluginInfo, PluginManager
10+
from jinja2_fsloader import FSLoader
1011
from jinja2.exceptions import TemplateNotFound, TemplateSyntaxError
1112

1213
from moban import constants, exceptions
13-
from jinja2_fsloader import FSLoader
1414
from moban.externals import file_system
1515

1616
JINJA2_LIBRARIES = "^moban_jinja2_.+$"

requirements.txt

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
1+
ruamel.yaml>=0.15.5;python_version == '3.6'
12
ruamel.yaml>=0.15.42;python_version == '3.7'
2-
ruamel.yaml>=0.15.5;python_version != '3.4' and python_version < '3.7'
33
ruamel.yaml>=0.15.98;python_version == '3.8'
4+
ruamel.yaml>=0.15.98;python_version == '3.9'
45
jinja2>=2.7.1
56
lml>=0.0.9
67
appdirs>=1.4.3

setup.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -91,9 +91,10 @@
9191

9292
PACKAGES = find_packages(exclude=["ez_setup", "examples", "tests", "tests.*"])
9393
EXTRAS_REQUIRE = {
94+
":python_version == '3.6'": ["ruamel.yaml>=0.15.5"],
9495
":python_version == '3.7'": ["ruamel.yaml>=0.15.42"],
95-
":python_version != '3.4' and python_version < '3.7'": ["ruamel.yaml>=0.15.5"],
9696
":python_version == '3.8'": ["ruamel.yaml>=0.15.98"],
97+
":python_version == '3.9'": ["ruamel.yaml>=0.15.98"],
9798
}
9899
# You do not need to read beyond this line
99100
PUBLISH_COMMAND = "{0} setup.py sdist bdist_wheel upload -r pypi".format(sys.executable)

0 commit comments

Comments
 (0)