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

Drop support for soon-EOL Python 3.6 #490

Merged
merged 1 commit into from Dec 14, 2021
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.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
17 changes: 4 additions & 13 deletions .github/workflows/benchmark.yml
Expand Up @@ -11,27 +11,18 @@ jobs:
strategy:
fail-fast: false
matrix:
python-version: ["3.8"]
os: [ubuntu-18.04]
python-version: ["3.10"]
os: [ubuntu-20.04]

steps:
- uses: actions/checkout@v2

- name: Ubuntu cache
uses: actions/cache@v2
if: startsWith(matrix.os, 'ubuntu')
with:
path: ~/.cache/pip
key:
${{ matrix.os }}-${{ matrix.python-version }}-${{ hashFiles('**/setup.py')
}}
restore-keys: |
${{ matrix.os }}-${{ matrix.python-version }}-

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
cache: pip
cache-dependency-path: "setup.py"

- name: Install dependencies
run: |
Expand Down
11 changes: 7 additions & 4 deletions .github/workflows/deploy.yml
Expand Up @@ -11,6 +11,7 @@ on:
release:
types:
- published
workflow_dispatch:

jobs:
build-native-wheels:
Expand Down Expand Up @@ -143,19 +144,21 @@ jobs:
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: 3.9
python-version: "3.10"
cache: pip
cache-dependency-path: "setup.py"

- name: Install dependencies
run: |
python -m pip install -U pip
python -m pip install -U setuptools twine wheel
python -m pip install -U build twine wheel

- name: Build package
run: |
git tag
python setup.py --version
python setup.py sdist --format=gztar
twine check dist/*
python -m build --sdist
twine check --strict dist/*

- name: Publish package to PyPI
if: github.event.action == 'published'
Expand Down
5 changes: 4 additions & 1 deletion .github/workflows/labels.yml
@@ -1,12 +1,15 @@
name: Sync labels

on:
push:
branches:
- main
paths:
- .github/labels.yml
workflow_dispatch:

jobs:
build:
sync:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/lint.yml
@@ -1,6 +1,6 @@
name: Lint

on: [push, pull_request]
on: [push, pull_request, workflow_dispatch]

jobs:
lint:
Expand All @@ -9,4 +9,4 @@ jobs:
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
- uses: pre-commit/action@v2.0.0
- uses: pre-commit/action@v2.0.3
3 changes: 2 additions & 1 deletion .github/workflows/release-drafter.yml
Expand Up @@ -5,10 +5,11 @@ on:
# branches to consider in the event; optional, defaults to all
branches:
- main
workflow_dispatch:

jobs:
update_release_draft:
if: github.repository == 'ultrajson/ultrajson'
if: github.repository_owner == 'ultrajson'
runs-on: ubuntu-latest
steps:
# Drafts your next release notes as pull requests are merged into "main"
Expand Down
28 changes: 9 additions & 19 deletions .github/workflows/test.yml
@@ -1,17 +1,20 @@
name: Test

on: [push, pull_request]
on: [push, pull_request, workflow_dispatch]

env:
FORCE_COLOR: 1

jobs:
build:
test:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
python-version: [ "3.6", "3.7", "3.8", "3.9", "3.10", "pypy3"]
python-version: ["pypy-3.8", "3.7", "3.8", "3.9", "3.10"]
os: [ubuntu-20.04, ubuntu-18.04, macos-latest, windows-2019]
exclude:
- { python-version: "pypy3", os: macos-latest }
- { python-version: "pypy-3.8", os: macos-latest }

steps:
- uses: actions/checkout@v2
Expand All @@ -20,21 +23,8 @@ jobs:
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}

- name: Get pip cache dir
id: pip-cache
run: |
echo "::set-output name=dir::$(pip cache dir)"

- name: Cache
uses: actions/cache@v2
with:
path: ${{ steps.pip-cache.outputs.dir }}
key:
${{ matrix.os }}-${{ matrix.python-version }}-v2-${{
hashFiles('**/setup.py') }}
restore-keys: |
${{ matrix.os }}-${{ matrix.python-version }}-v2-
cache: pip
cache-dependency-path: "setup.py"

- name: Install dependencies
run: |
Expand Down
15 changes: 7 additions & 8 deletions .pre-commit-config.yaml
@@ -1,23 +1,23 @@
repos:
- repo: https://github.com/asottile/pyupgrade
rev: v2.29.0
rev: v2.29.1
hooks:
- id: pyupgrade
args: ["--py36-plus"]
args: [--py37-plus]

- repo: https://github.com/psf/black
rev: 21.9b0
rev: 21.11b1
hooks:
- id: black
args: ["--target-version", "py36"]
args: [--target-version=py37]

- repo: https://github.com/PyCQA/isort
rev: 5.9.3
rev: 5.10.1
hooks:
- id: isort

- repo: https://github.com/PyCQA/flake8
rev: 3.9.2
rev: 4.0.1
hooks:
- id: flake8
additional_dependencies: [flake8-2020, flake8-implicit-str-concat]
Expand All @@ -40,10 +40,9 @@ repos:
exclude: "^.github/.*_TEMPLATE.md"

- repo: https://github.com/asottile/setup-cfg-fmt
rev: v1.17.0
rev: v1.20.0
hooks:
- id: setup-cfg-fmt
args: ["--max-py-version=3.10"]

ci:
autoupdate_schedule: quarterly
4 changes: 2 additions & 2 deletions .travis.yml
Expand Up @@ -8,8 +8,8 @@ arch:

# Only test oldest and newest supported versions
python:
- "3.6"
- "3.9"
- "3.7"
- "3.10-dev"

jobs:
fast_finish: true
Expand Down
2 changes: 1 addition & 1 deletion README.md
Expand Up @@ -10,7 +10,7 @@
[![Code style: Black](https://img.shields.io/badge/code%20style-Black-000000.svg)](https://github.com/psf/black)

UltraJSON is an ultra fast JSON encoder and decoder written in pure C with bindings for
Python 3.6+.
Python 3.7+.

Install with pip:

Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Expand Up @@ -2,7 +2,7 @@
requires = ["setuptools>=42", "wheel", "setuptools_scm[toml]>=3.4"]

[tool.black]
target_version = ["py36"]
target_version = ["py37"]

[tool.isort]
profile = "black"
5 changes: 2 additions & 3 deletions setup.cfg
Expand Up @@ -14,7 +14,6 @@ classifiers =
Programming Language :: C
Programming Language :: Python :: 3
Programming Language :: Python :: 3 :: Only
Programming Language :: Python :: 3.6
Programming Language :: Python :: 3.7
Programming Language :: Python :: 3.8
Programming Language :: Python :: 3.9
Expand All @@ -24,9 +23,9 @@ project_urls =
Source=https://github.com/ultrajson/ultrajson

[options]
python_requires = >=3.6
python_requires = >=3.7
setup_requires =
setuptools_scm
setuptools-scm

[flake8]
max_line_length = 88