[python] Add support interpreter version 310 and 311-dev (#11170)
* Change version of package
* Fix tox error
* Change dev status to beta
* py4j not work on py{10,11} OS Windows
This commit is contained in:
parent
d02cf85b60
commit
4d427ee215
|
|
@ -61,7 +61,7 @@ jobs:
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v2
|
||||||
- name: Set up Python 3.7
|
- name: Set up Python 3.7
|
||||||
uses: actions/setup-python@v2
|
uses: actions/setup-python@v4
|
||||||
with:
|
with:
|
||||||
python-version: 3.7
|
python-version: 3.7
|
||||||
- name: Install Dependences
|
- name: Install Dependences
|
||||||
|
|
@ -78,12 +78,20 @@ jobs:
|
||||||
strategy:
|
strategy:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
python-version: [3.6, 3.7, 3.8, 3.9]
|
# YAML parse `3.10` to `3.1`, so we have to add quotes for `'3.10'`, see also:
|
||||||
os: [ubuntu-18.04, macOS-latest, windows-latest]
|
# https://github.com/actions/setup-python/issues/160#issuecomment-724485470
|
||||||
|
python-version: [3.6, 3.7, 3.8, 3.9, '3.10', 3.11-dev]
|
||||||
|
os: [ubuntu-latest, macOS-latest, windows-latest]
|
||||||
|
# Skip because dependence [py4j](https://pypi.org/project/py4j/) not work on those environments
|
||||||
|
exclude:
|
||||||
|
- os: windows-latest
|
||||||
|
python-version: '3.10'
|
||||||
|
- os: windows-latest
|
||||||
|
python-version: 3.11-dev
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v2
|
||||||
- name: Set up Python ${{ matrix.python-version }}
|
- name: Set up Python ${{ matrix.python-version }}
|
||||||
uses: actions/setup-python@v2
|
uses: actions/setup-python@v4
|
||||||
with:
|
with:
|
||||||
python-version: ${{ matrix.python-version }}
|
python-version: ${{ matrix.python-version }}
|
||||||
- name: Install Dependences
|
- name: Install Dependences
|
||||||
|
|
@ -104,7 +112,7 @@ jobs:
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v2
|
||||||
- name: Set up Python 3.7
|
- name: Set up Python 3.7
|
||||||
uses: actions/setup-python@v2
|
uses: actions/setup-python@v4
|
||||||
with:
|
with:
|
||||||
python-version: 3.7
|
python-version: 3.7
|
||||||
- name: Install Dependences
|
- name: Install Dependences
|
||||||
|
|
@ -123,7 +131,7 @@ jobs:
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v2
|
||||||
- name: Set up Python 3.7
|
- name: Set up Python 3.7
|
||||||
uses: actions/setup-python@v2
|
uses: actions/setup-python@v4
|
||||||
with:
|
with:
|
||||||
python-version: 3.7
|
python-version: 3.7
|
||||||
- name: Install Dependences
|
- name: Install Dependences
|
||||||
|
|
@ -163,7 +171,7 @@ jobs:
|
||||||
-Pdocker,release -Ddocker.tag=ci \
|
-Pdocker,release -Ddocker.tag=ci \
|
||||||
-pl dolphinscheduler-standalone-server -am
|
-pl dolphinscheduler-standalone-server -am
|
||||||
- name: Set up Python 3.7
|
- name: Set up Python 3.7
|
||||||
uses: actions/setup-python@v2
|
uses: actions/setup-python@v4
|
||||||
with:
|
with:
|
||||||
python-version: 3.7
|
python-version: 3.7
|
||||||
- name: Install Dependences
|
- name: Install Dependences
|
||||||
|
|
|
||||||
|
|
@ -45,6 +45,9 @@ pydolphinscheduler version
|
||||||
# 0.1.0
|
# 0.1.0
|
||||||
```
|
```
|
||||||
|
|
||||||
|
> NOTE: package apache-dolphinscheduler not work on above Python version 3.10(including itself) in Window operating system
|
||||||
|
> due to dependence [py4j](https://pypi.org/project/py4j/) not work on those environments.
|
||||||
|
|
||||||
Here we show you how to install and run a simple example of pydolphinscheduler
|
Here we show you how to install and run a simple example of pydolphinscheduler
|
||||||
|
|
||||||
### Start Server And Run Example
|
### Start Server And Run Example
|
||||||
|
|
@ -84,4 +87,4 @@ If you are interested in how to release **PyDolphinScheduler**, you could go and
|
||||||
|
|
||||||
## What's more
|
## What's more
|
||||||
|
|
||||||
For more detail information, please go to see **PyDolphinScheduler** [document](https://dolphinscheduler.apache.org/python/index.html)
|
For more detail information, please go to see **PyDolphinScheduler** latest(unreleased) [document](https://dolphinscheduler.apache.org/python/dev/index.html)
|
||||||
|
|
|
||||||
|
|
@ -32,7 +32,7 @@ if sys.version_info[0] < 3:
|
||||||
|
|
||||||
logger = logging.getLogger(__name__)
|
logger = logging.getLogger(__name__)
|
||||||
|
|
||||||
version = "2.0.4"
|
version = "dev"
|
||||||
|
|
||||||
# Start package required
|
# Start package required
|
||||||
prod = [
|
prod = [
|
||||||
|
|
@ -156,7 +156,7 @@ setup(
|
||||||
platforms=["any"],
|
platforms=["any"],
|
||||||
classifiers=[
|
classifiers=[
|
||||||
# complete classifier list: http://pypi.python.org/pypi?%3Aaction=list_classifiers
|
# complete classifier list: http://pypi.python.org/pypi?%3Aaction=list_classifiers
|
||||||
"Development Status :: 3 - Alpha",
|
"Development Status :: 4 - Beta",
|
||||||
"Environment :: Console",
|
"Environment :: Console",
|
||||||
"Intended Audience :: Developers",
|
"Intended Audience :: Developers",
|
||||||
"License :: OSI Approved :: Apache Software License",
|
"License :: OSI Approved :: Apache Software License",
|
||||||
|
|
@ -169,6 +169,8 @@ setup(
|
||||||
"Programming Language :: Python :: 3.7",
|
"Programming Language :: Python :: 3.7",
|
||||||
"Programming Language :: Python :: 3.8",
|
"Programming Language :: Python :: 3.8",
|
||||||
"Programming Language :: Python :: 3.9",
|
"Programming Language :: Python :: 3.9",
|
||||||
|
"Programming Language :: Python :: 3.10",
|
||||||
|
"Programming Language :: Python :: 3.11",
|
||||||
"Programming Language :: Python :: Implementation :: CPython",
|
"Programming Language :: Python :: Implementation :: CPython",
|
||||||
"Programming Language :: Python :: Implementation :: PyPy",
|
"Programming Language :: Python :: Implementation :: PyPy",
|
||||||
"Topic :: Software Development :: User Interfaces",
|
"Topic :: Software Development :: User Interfaces",
|
||||||
|
|
|
||||||
|
|
@ -20,7 +20,7 @@
|
||||||
import click
|
import click
|
||||||
from click import echo
|
from click import echo
|
||||||
|
|
||||||
from pydolphinscheduler import __version__
|
import pydolphinscheduler
|
||||||
from pydolphinscheduler.configuration import (
|
from pydolphinscheduler.configuration import (
|
||||||
get_single_config,
|
get_single_config,
|
||||||
init_config_file,
|
init_config_file,
|
||||||
|
|
@ -48,9 +48,9 @@ def version(part: str) -> None:
|
||||||
"""Show current version of pydolphinscheduler."""
|
"""Show current version of pydolphinscheduler."""
|
||||||
if part:
|
if part:
|
||||||
idx = version_option_val.index(part)
|
idx = version_option_val.index(part)
|
||||||
echo(f"{__version__.split('.')[idx]}")
|
echo(f"{pydolphinscheduler.__version__.split('.')[idx]}")
|
||||||
else:
|
else:
|
||||||
echo(f"{__version__}")
|
echo(f"{pydolphinscheduler.__version__}")
|
||||||
|
|
||||||
|
|
||||||
@cli.command()
|
@cli.command()
|
||||||
|
|
|
||||||
|
|
@ -17,9 +17,11 @@
|
||||||
|
|
||||||
"""Test command line interface subcommand `version`."""
|
"""Test command line interface subcommand `version`."""
|
||||||
|
|
||||||
|
from unittest.mock import patch
|
||||||
|
|
||||||
import pytest
|
import pytest
|
||||||
|
|
||||||
from pydolphinscheduler import __version__
|
import pydolphinscheduler
|
||||||
from pydolphinscheduler.cli.commands import cli
|
from pydolphinscheduler.cli.commands import cli
|
||||||
from tests.testing.cli import CliTestWrapper
|
from tests.testing.cli import CliTestWrapper
|
||||||
|
|
||||||
|
|
@ -27,21 +29,27 @@ from tests.testing.cli import CliTestWrapper
|
||||||
def test_version():
|
def test_version():
|
||||||
"""Test whether subcommand `version` correct."""
|
"""Test whether subcommand `version` correct."""
|
||||||
cli_test = CliTestWrapper(cli, ["version"])
|
cli_test = CliTestWrapper(cli, ["version"])
|
||||||
cli_test.assert_success(output=f"{__version__}")
|
cli_test.assert_success(output=f"{pydolphinscheduler.__version__}")
|
||||||
|
|
||||||
|
|
||||||
@pytest.mark.parametrize(
|
@pytest.mark.parametrize(
|
||||||
"part, idx",
|
"version, part, idx",
|
||||||
[
|
[
|
||||||
("major", 0),
|
("1.2.3", "major", 0),
|
||||||
("minor", 1),
|
("0.1.3", "minor", 1),
|
||||||
("micro", 2),
|
("3.1.0", "micro", 2),
|
||||||
|
("1.2.3-beta-1", "micro", 2),
|
||||||
|
("1.2.3-alpha", "micro", 2),
|
||||||
|
("1.2.3a2", "micro", 2),
|
||||||
|
("1.2.3b1", "micro", 2),
|
||||||
],
|
],
|
||||||
)
|
)
|
||||||
def test_version_part(part: str, idx: int):
|
@patch("pydolphinscheduler.__version__")
|
||||||
|
def test_version_part(mock_version, version: str, part: str, idx: int):
|
||||||
"""Test subcommand `version` option `--part`."""
|
"""Test subcommand `version` option `--part`."""
|
||||||
|
mock_version.return_value = version
|
||||||
cli_test = CliTestWrapper(cli, ["version", "--part", part])
|
cli_test = CliTestWrapper(cli, ["version", "--part", part])
|
||||||
cli_test.assert_success(output=f"{__version__.split('.')[idx]}")
|
cli_test.assert_success(output=f"{pydolphinscheduler.__version__.split('.')[idx]}")
|
||||||
|
|
||||||
|
|
||||||
@pytest.mark.parametrize(
|
@pytest.mark.parametrize(
|
||||||
|
|
|
||||||
|
|
@ -16,10 +16,10 @@
|
||||||
# under the License.
|
# under the License.
|
||||||
|
|
||||||
[tox]
|
[tox]
|
||||||
envlist = local-ci, auto-lint, lint, doc-build, doc-build-multi, code-test, integrate-test, local-integrate-test, py{36,37,38,39}
|
envlist = local-ci, auto-lint, lint, doc-build, doc-build-multi, code-test, integrate-test, local-integrate-test, py{36,37,38,39,310,311}
|
||||||
|
|
||||||
[testenv]
|
[testenv]
|
||||||
allowlist_externals =
|
allowlist_externals =
|
||||||
make
|
make
|
||||||
git
|
git
|
||||||
|
|
||||||
|
|
@ -70,6 +70,7 @@ setenv =
|
||||||
commands =
|
commands =
|
||||||
{[testenv:integrate-test]commands}
|
{[testenv:integrate-test]commands}
|
||||||
|
|
||||||
|
# local-ci do not build `doc-build-multi`
|
||||||
[testenv:local-ci]
|
[testenv:local-ci]
|
||||||
extras = dev
|
extras = dev
|
||||||
commands =
|
commands =
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue