Skip to content

Commit

Permalink
Merge pull request #81 from mozilla-releng/hneiva/update-python-version
Browse files Browse the repository at this point in the history
feat: Update python versions
  • Loading branch information
hneiva authored Jun 18, 2024
2 parents 50cfe8e + 6bc8976 commit 828d514
Show file tree
Hide file tree
Showing 4 changed files with 27 additions and 20 deletions.
17 changes: 13 additions & 4 deletions .taskcluster.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,19 @@ tasks:
else: '${event.pull_request.user.login}@users.noreply.github.com'}
in:
# map tox command -> docker image
$map: [['py27', 'python:2.7'], ['pypy', 'pypy:2'],
['py34', 'python:3.4'], ['py35', 'python:3.5'],
['py36', 'python:3.6'], ['py37', 'python:3.7'],
['py38', 'python:3.8'], ['check', 'python:3.7']]
$map:
- - py38
- python:3.8
- - py39
- python:3.9
- - py310
- python:3.10
- - py311
- python:3.11
- - py312
- python:3.12
- - check
- python:3.12
each(py):
taskId: "${as_slugid(py[0])}"
provisionerId: "proj-releng"
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.black]
line-length = 140
target-version = ["py27", "py34", "py35", "py36", "py37", "py38"]
target-version = ["py38", "py39", "py310", "py311", "py312"]
include = '\.(wsgi|pyi?)$'
exclude = '''
/(
Expand Down
4 changes: 2 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@
package_dir={"": "src"},
entry_points={"console_scripts": ["retry = redo.cmd:main"]},
url="https://github.com/mozilla-releng/redo",
license='MPL-2.0',
license="MPL-2.0",
classifiers=[
'License :: OSI Approved :: Mozilla Public License 2.0 (MPL 2.0)',
"License :: OSI Approved :: Mozilla Public License 2.0 (MPL 2.0)",
],
)
24 changes: 11 additions & 13 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -7,27 +7,25 @@ passenv =
PYTHON_VERSION
TOXENV
setenv =
PYTHON_VERSION=3.7
PYTHON_VERSION=3.12
# TODO: not sure how to test multiple versions in the same invocation
TOXENV=check,py27,pypy,py34,py35,py36,py37,py38
TOXENV=check,py38,py39,py310,py311,py312
deps =
usedevelop = false
depends =
skip_install = true
ignore_errors = true
commands =
docker build --build-arg PYTHON_VERSION=3.12 -t redo-{envname}-py312-test -f Dockerfile.test .
docker run --rm -v {toxinidir}:/app -v redo-{envname}-py312-tox:/app/.tox redo-{envname}-py312-test check,py312
docker build --build-arg PYTHON_VERSION=3.11 -t redo-{envname}-py311-test -f Dockerfile.test .
docker run --rm -v {toxinidir}:/app -v redo-{envname}-py311-tox:/app/.tox redo-{envname}-py311-test py311
docker build --build-arg PYTHON_VERSION=3.10 -t redo-{envname}-py310-test -f Dockerfile.test .
docker run --rm -v {toxinidir}:/app -v redo-{envname}-py310-tox:/app/.tox redo-{envname}-py310-test py310
docker build --build-arg PYTHON_VERSION=3.9 -t redo-{envname}-py39-test -f Dockerfile.test .
docker run --rm -v {toxinidir}:/app -v redo-{envname}-py39-tox:/app/.tox redo-{envname}-py39-test py39
docker build --build-arg PYTHON_VERSION=3.8 -t redo-{envname}-py38-test -f Dockerfile.test .
docker run --rm -v {toxinidir}:/app -v redo-{envname}-py38-tox:/app/.tox redo-{envname}-py38-test check,py38
docker build --build-arg PYTHON_VERSION=3.7 -t redo-{envname}-py37-test -f Dockerfile.test .
docker run --rm -v {toxinidir}:/app -v redo-{envname}-py37-tox:/app/.tox redo-{envname}-py37-test py37
docker build --build-arg PYTHON_VERSION=3.6 -t redo-{envname}-py36-test -f Dockerfile.test .
docker run --rm -v {toxinidir}:/app -v redo-{envname}-py36-tox:/app/.tox redo-{envname}-py36-test py36
docker build --build-arg PYTHON_VERSION=3.5 -t redo-{envname}-py35-test -f Dockerfile.test .
docker run --rm -v {toxinidir}:/app -v redo-{envname}-py35-tox:/app/.tox redo-{envname}-py35-test py35
docker build --build-arg PYTHON_VERSION=3.4 -t redo-{envname}-py34-test -f Dockerfile.test .
docker run --rm -v {toxinidir}:/app -v redo-{envname}-py34-tox:/app/.tox redo-{envname}-py34-test py34
docker build --build-arg PYTHON_VERSION=2.7 -t redo-{envname}-py27-test -f Dockerfile.test .
docker run --rm -v {toxinidir}:/app -v redo-{envname}-py27-tox:/app/.tox redo-{envname}-py27-test py27
docker run --rm -v {toxinidir}:/app -v redo-{envname}-py38-tox:/app/.tox redo-{envname}-py38-test py38

[testenv]
depends = clean
Expand Down

0 comments on commit 828d514

Please sign in to comment.