Skip to content

Commit 534b914

Browse files
committed
chore(python): Update PyO3 to 0.17.1 & drop Python 3.6 support
1 parent 8800b2c commit 534b914

File tree

8 files changed

+19
-33
lines changed

8 files changed

+19
-33
lines changed

.github/workflows/build.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ jobs:
9090
fail-fast: false
9191
matrix:
9292
os: [ubuntu-20.04, macos-11, windows-2019]
93-
python-version: ['3.6', '3.7', '3.8', '3.9', '3.10']
93+
python-version: ['3.7', '3.8', '3.9', '3.10']
9494

9595
name: Python ${{ matrix.python-version }} on ${{ matrix.os }}
9696
runs-on: ${{ matrix.os }}

.github/workflows/python-release.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ jobs:
7575
path: wheelhouse/*.whl
7676

7777
wheels-macos-universal:
78-
# `cibuildwheel` does not support building CPython 3.6/3.7 wheels for macOS ARM64
78+
# `cibuildwheel` does not support building CPython 3.7 wheels for macOS ARM64
7979
# This job build universal wheel that covers these versions.
8080
# Non-universal wheels are also in place, because they have smaller size & will be used in Python 3.8+ installations
8181
name: "Wheels for macOS universal2"
@@ -101,7 +101,7 @@ jobs:
101101
- name: Build the wheel
102102
run: |
103103
cd bindings/python && \
104-
../../venv/bin/python setup.py bdist_wheel --py-limited-api=cp36 && \
104+
../../venv/bin/python setup.py bdist_wheel --py-limited-api=cp37 && \
105105
mv dist/css_inline*.whl ../../wheelhouse
106106
env:
107107
MACOSX_DEPLOYMENT_TARGET: '10.10'

bindings/python/CHANGELOG.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,14 @@
22

33
## [Unreleased]
44

5+
### Changed
6+
7+
- Update `PyO3` to `0.17.1`.
8+
9+
### Removed
10+
11+
- Python 3.6 support.
12+
513
## [0.8.3] - 2022-07-21
614

715
### Fixed

bindings/python/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ features = ["http", "file"]
2222
[dependencies]
2323
url = "2"
2424
rayon = "1"
25-
pyo3 = { version = "^0.15", features = ["extension-module", "abi3"] }
25+
pyo3 = { version = "0.17.1", features = ["extension-module", "abi3"] }
2626
pyo3-built = "0.4"
2727

2828
[profile.release]

bindings/python/README.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -109,13 +109,12 @@ The results above were measured with stable `rustc 1.61.0`, `Python 3.10.4`, `Li
109109
Python support
110110
--------------
111111

112-
`css_inline` supports CPython 3.6, 3.7, 3.8, 3.9, 3.10, and PyPy 3.7 and 3.8.
112+
`css_inline` supports CPython 3.7, 3.8, 3.9, 3.10, and PyPy 3.7 and 3.8.
113113

114114
The following wheels are available:
115115

116116
| | manylinux<br/>musllinux<br/>x86_64 | manylinux<br/>musllinux<br/>aarch64 | macOS Intel | macOS ARM64 | Windows 64bit | Windows 32bit |
117117
|----------------|:----------------:|:-----------------:|:-----------:|:-----------:|:-------------:|:-------------:|
118-
| CPython 3.6 ||| ✔️ | ✔ ️ | ✔️ | ✔️ |
119118
| CPython 3.7 ||| ✔️ || ✔️ | ✔️ |
120119
| CPython 3.8 ||| ✔️ | ✔️ | ✔️ | ✔️ |
121120
| CPython 3.9 ||| ✔️ | ✔️ | ✔️ | ✔️ |

bindings/python/setup.py

Lines changed: 3 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,7 @@
11
import platform
22

33
from setuptools import setup
4-
5-
try:
6-
from setuptools_rust import Binding, RustExtension
7-
except ImportError:
8-
from textwrap import dedent
9-
10-
raise ImportError(
11-
dedent(
12-
"""
13-
`setuptools-rust` is a required dependency to run `setup.py`.
14-
This should not happen if you're using `pip>=10` as it honors `pyproject.toml`.
15-
This usually (at least on our workflows) might happen while
16-
building source-distribution.
17-
"""
18-
)
19-
)
4+
from setuptools_rust import Binding, RustExtension
205

216

227
def call_setup():
@@ -31,17 +16,15 @@ def call_setup():
3116
author_email="[email protected]",
3217
maintainer="Dmitry Dygalo",
3318
maintainer_email="[email protected]",
34-
python_requires=">=3.6",
19+
python_requires=">=3.7",
3520
url="https://github.com/Stranger6667/css-inline/tree/master/bindings/python",
3621
license="MIT",
3722
rust_extensions=[
3823
RustExtension(
3924
"css_inline",
4025
py_limited_api=True,
4126
features=(
42-
[]
43-
if platform.python_implementation() == "PyPy"
44-
else ["pyo3/abi3-py36"]
27+
[] if platform.python_implementation() == "PyPy" else ["pyo3/abi3"]
4528
),
4629
rust_version=">=1.54.0",
4730
)
@@ -54,7 +37,6 @@ def call_setup():
5437
"Operating System :: Microsoft :: Windows",
5538
"Operating System :: POSIX",
5639
"Programming Language :: Python :: 3",
57-
"Programming Language :: Python :: 3.6",
5840
"Programming Language :: Python :: 3.7",
5941
"Programming Language :: Python :: 3.8",
6042
"Programming Language :: Python :: 3.9",

bindings/python/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
rust_2018_idioms,
2424
rust_2018_compatibility
2525
)]
26-
use css_inline as rust_inline;
26+
use ::css_inline as rust_inline;
2727
use pyo3::{create_exception, exceptions, prelude::*, types::PyList, wrap_pyfunction};
2828
use rayon::prelude::*;
2929
use std::borrow::Cow;

bindings/python/tox.ini

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,13 @@
11
[tox]
2-
# Skip Source distribution build to allow each task to install it via pip
3-
# (workaround the fact that setup.py does not honor pyproject.toml)
42
skipsdist = True
5-
6-
envlist = py{36,37,38,39}
3+
envlist = py{37,38,39,310}
74

85
[testenv]
96
deps =
107
pytest
118
hypothesis
129
commands =
13-
pip install -e . # Installing it within commands allow faster env build (NOTE: uses debug rust build)
10+
pip install .
1411
python -m pytest tests-py {posargs:}
1512

1613
[testenv:build-sdist]

0 commit comments

Comments
 (0)