Skip to content
This repository has been archived by the owner on Oct 12, 2024. It is now read-only.

Commit

Permalink
⬆️ Deprecate Python 3.6 and add CI for latest versions (#32)
Browse files Browse the repository at this point in the history
  • Loading branch information
tiangolo authored Jul 28, 2023
1 parent 651e2f4 commit 2a4ba32
Show file tree
Hide file tree
Showing 11 changed files with 28 additions and 12 deletions.
20 changes: 18 additions & 2 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,12 @@ name: Test

on:
push:
branches:
- master
pull_request:
types: [opened, synchronize]
types:
- opened
- synchronize
workflow_dispatch:
inputs:
debug_enabled:
Expand All @@ -16,7 +20,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.7", "3.8", "3.9"]
python-version: ["3.7", "3.8", "3.9", "3.10", "3.11"]
fail-fast: false

steps:
Expand Down Expand Up @@ -58,3 +62,15 @@ jobs:
run: python -m poetry run bash scripts/test.sh
- name: Upload coverage
uses: codecov/codecov-action@v1

# https://github.com/marketplace/actions/alls-green#why
check: # This job does nothing and is only used for the branch protection
if: always()
needs:
- test
runs-on: ubuntu-latest
steps:
- name: Decide whether the needed jobs succeeded or failed
uses: re-actors/alls-green@release/v1
with:
jobs: ${{ toJSON(needs) }}
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ You could manually write the `__version__` variable and handle the synchronizati

The current [official way of doing it without duplicating the value](https://github.com/python-poetry/poetry/pull/2366#issuecomment-652418094) is with `importlib.metadata`.

But that module is only available in Python 3.8 and above. So, for Python 3.7 and 3.6 you have to install a backport as a dependency of your package:
But that module is only available in Python 3.8 and above. So, for Python 3.7 you have to install a backport as a dependency of your package:

```toml
[tool.poetry.dependencies]
Expand Down
2 changes: 1 addition & 1 deletion tests/assets/custom_packages/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ readme = "README.md"
packages = [{include = "custom_package"}]

[tool.poetry.dependencies]
python = "^3.6"
python = "^3.7"

[build-system]
requires = ["poetry-core"]
Expand Down
2 changes: 1 addition & 1 deletion tests/assets/git_tag/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ authors = ["Sebastián Ramírez <[email protected]>"]
readme = "README.md"

[tool.poetry.dependencies]
python = "^3.6"
python = "^3.7"

[build-system]
requires = ["poetry-core"]
Expand Down
2 changes: 1 addition & 1 deletion tests/assets/multiple_packages/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ readme = "README.md"
packages = [{include = "custom_package"}, {include = "custom_packageb"}]

[tool.poetry.dependencies]
python = "^3.6"
python = "^3.7"

[build-system]
requires = ["poetry-core"]
Expand Down
2 changes: 1 addition & 1 deletion tests/assets/no_config/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ authors = ["Sebastián Ramírez <[email protected]>"]
readme = "README.md"

[tool.poetry.dependencies]
python = "^3.6"
python = "^3.7"

[build-system]
requires = ["poetry-core"]
Expand Down
2 changes: 1 addition & 1 deletion tests/assets/no_config_source/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ authors = ["Sebastián Ramírez <[email protected]>"]
readme = "README.md"

[tool.poetry.dependencies]
python = "^3.6"
python = "^3.7"

[build-system]
requires = ["poetry-core"]
Expand Down
2 changes: 1 addition & 1 deletion tests/assets/no_packages/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ authors = ["Sebastián Ramírez <[email protected]>"]
readme = "README.md"

[tool.poetry.dependencies]
python = "^3.6"
python = "^3.7"

[build-system]
requires = ["poetry-core"]
Expand Down
2 changes: 1 addition & 1 deletion tests/assets/no_standard_dir/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ readme = "README.md"
packages = [{include = "test_custom_version", from = "src"}]

[tool.poetry.dependencies]
python = "^3.6"
python = "^3.7"

[build-system]
requires = ["poetry-core"]
Expand Down
2 changes: 1 addition & 1 deletion tests/assets/no_version_var/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ authors = ["Sebastián Ramírez <[email protected]>"]
readme = "README.md"

[tool.poetry.dependencies]
python = "^3.6"
python = "^3.7"

[build-system]
requires = ["poetry-core"]
Expand Down
2 changes: 1 addition & 1 deletion tests/assets/variations/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ authors = ["Sebastián Ramírez <[email protected]>"]
readme = "README.md"

[tool.poetry.dependencies]
python = "^3.6"
python = "^3.7"

[build-system]
requires = ["poetry-core"]
Expand Down

0 comments on commit 2a4ba32

Please sign in to comment.