Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrade to Python 3.12 #39

Merged
merged 5 commits into from
Nov 23, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 9 additions & 17 deletions .github/workflows/main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,17 @@ on:
jobs:
linter:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [ '3.11.x', '3.12.x' ]
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Install poetry
run: pipx install poetry
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.11.x'
python-version: ${{ matrix.python-version }}
cache: poetry
- name: Install Python dependencies
run: make dependencies
Expand All @@ -30,9 +33,9 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [ '3.11.x' ]
python-version: [ '3.11.x', '3.12.x' ]
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Install poetry
run: pipx install poetry
- name: Set up Python
Expand All @@ -49,22 +52,12 @@ jobs:
make check
unit:
runs-on: ubuntu-latest
services:
postgres:
image: postgres:14
env:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
POSTGRES_DB: ${{inputs.app_name}}
ports:
- 5432:5432
options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5

strategy:
matrix:
python-version: [ '3.11.x' ]
python-version: [ '3.11.x', '3.12.x' ]
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Install poetry
run: pipx install poetry
- name: Set up Python
Expand All @@ -80,7 +73,6 @@ jobs:
run: |
make unit
env:
DATABASE_URL: postgres://postgres:postgres@localhost:5432/${{inputs.app_name}}
LOG_LEVEL: ERROR

- name: Report Coverage
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/publish.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ jobs:
publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Install poetry
run: pipx install poetry
- name: Set up Python
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ jobs:
release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Install poetry
run: pipx install poetry
- name: Set up Python
Expand Down
2 changes: 1 addition & 1 deletion .python-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
3.11.1
3.12.0
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,12 @@ check:

lint:
@echo "Checking code style ..."
poetry run black --check .
poetry run ruff format --check .
poetry run ruff check .

style:
@echo "Applying code style ..."
poetry run black .
poetry run ruff format .
poetry run ruff . --fix

unit:
Expand Down
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
![Github CI](https://github.com/flamingo-run/django-cloud-tasks/workflows/Github%20CI/badge.svg)
[![Maintainability](https://api.codeclimate.com/v1/badges/4e211a8dc7a2520873c6/maintainability)](https://codeclimate.com/github/flamingo-run/django-cloud-tasks/maintainability)
[![Test Coverage](https://api.codeclimate.com/v1/badges/4e211a8dc7a2520873c6/test_coverage)](https://codeclimate.com/github/flamingo-run/django-cloud-tasks/test_coverage)
[![python](https://img.shields.io/badge/python-3.9-blue.svg)]()
[![python](https://img.shields.io/badge/python-3.11-blue.svg)]()
[![python](https://img.shields.io/badge/python-3.12-blue.svg)]()

# Django Cloud Tasks

Expand Down
990 changes: 473 additions & 517 deletions poetry.lock

Large diffs are not rendered by default.

14 changes: 4 additions & 10 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,22 +1,21 @@
[tool.poetry]
name = "django-google-cloud-tasks"
version = "2.6.0"
version = "2.7.0"
description = "Async Tasks with HTTP endpoints"
authors = ["Joao Daher <[email protected]>"]
packages = [
{ include = "django_cloud_tasks" },
]

[tool.poetry.dependencies]
python = ">=3.11,<3.12"
python = ">=3.11,<=3.12"
django = ">=4,<5"
gcp-pilot = {version = "*", extras = ["tasks", "pubsub"]}
drf-kit = "^1.21.6"
drf-kit = "*"


[tool.poetry.dev-dependencies]
ruff = "*"
black = "*"
coverage = "*"
factory-boy = "*"
freezegun = "*"
Expand All @@ -30,14 +29,9 @@ pytest-random-order = "*"
pytest-timeout = "*"


[tool.black]
line-length = 120
target-version = ['py311']


[tool.ruff]
line-length = 120
target-version = "py311"
target-version = "py312"


[tool.pytest.ini_options]
Expand Down