Skip to content

Commit 21069cc

Browse files
committed
Bump MSRV to 1.56 and minimum Python version to 3.8
1 parent 6b85130 commit 21069cc

File tree

12 files changed

+25
-25
lines changed

12 files changed

+25
-25
lines changed

.github/workflows/build.yml

-4
Original file line numberDiff line numberDiff line change
@@ -201,7 +201,3 @@ jobs:
201201
# TODO: this is a hack to workaround compile_error! warnings about auto-initialize on PyPy
202202
# Once cargo's `resolver = "2"` is stable (~ MSRV Rust 1.52), remove this.
203203
PYO3_CI: 1
204-
# This is a hack to make CARGO_PRIMARY_PACKAGE always set even for the
205-
# msrv job. MSRV is currently 1.48, but CARGO_PRIMARY_PACKAGE only came in
206-
# 1.49.
207-
CARGO_PRIMARY_PACKAGE: 1

.github/workflows/ci.yml

+2-4
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ jobs:
8181
},
8282
]
8383
include:
84-
- rust: 1.48.0
84+
- rust: 1.56.0
8585
python-version: "3.11"
8686
platform:
8787
{
@@ -178,12 +178,10 @@ jobs:
178178
extra-features: ["multiple-pymethods"] # Because MSRV doesn't support this
179179
rust: [stable]
180180
python-version: [
181-
"3.7",
182181
"3.8",
183182
"3.9",
184183
"3.10",
185184
"3.11",
186-
"pypy-3.7",
187185
"pypy-3.8",
188186
"pypy-3.9"
189187
]
@@ -207,7 +205,7 @@ jobs:
207205
]
208206
include:
209207
# Test minimal supported Rust version
210-
- rust: 1.48.0
208+
- rust: 1.56.0
211209
python-version: "3.11"
212210
platform:
213211
{

Cargo.toml

+1
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ categories = ["api-bindings", "development-tools::ffi"]
1212
license = "Apache-2.0"
1313
exclude = ["/.gitignore", ".cargo/config", "/codecov.yml", "/Makefile", "/pyproject.toml", "/noxfile.py", "/.github", "/tests/test_compile_error.rs", "/tests/ui"]
1414
edition = "2018"
15+
rust-version = "1.56"
1516

1617
[dependencies]
1718
cfg-if = "1.0"

README.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
[![benchmark](https://github.com/PyO3/pyo3/actions/workflows/bench.yml/badge.svg)](https://pyo3.rs/dev/bench/)
55
[![codecov](https://codecov.io/gh/PyO3/pyo3/branch/main/graph/badge.svg)](https://codecov.io/gh/PyO3/pyo3)
66
[![crates.io](https://img.shields.io/crates/v/pyo3)](https://crates.io/crates/pyo3)
7-
[![minimum rustc 1.48](https://img.shields.io/badge/rustc-1.48+-blue.svg)](https://rust-lang.github.io/rfcs/2495-min-rust-version.html)
7+
[![minimum rustc 1.56](https://img.shields.io/badge/rustc-1.56+-blue.svg)](https://rust-lang.github.io/rfcs/2495-min-rust-version.html)
88
[![dev chat](https://img.shields.io/gitter/room/nwjs/nw.js.svg)](https://gitter.im/PyO3/Lobby)
99
[![contributing notes](https://img.shields.io/badge/contribute-on%20github-Green)](https://github.com/PyO3/pyo3/blob/main/Contributing.md)
1010

@@ -17,8 +17,8 @@
1717
## Usage
1818

1919
PyO3 supports the following software versions:
20-
- Python 3.7 and up (CPython and PyPy)
21-
- Rust 1.48 and up
20+
- Python 3.8 and up (CPython and PyPy)
21+
- Rust 1.56 and up
2222

2323
You can use PyO3 to write a native Python module in Rust, or to embed Python in a Rust binary. The following sections explain each of these in turn.
2424

examples/plugin/plugin_api/pyproject.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ build-backend = "maturin"
44

55
[project]
66
name = "plugin_api"
7-
requires-python = ">=3.7"
7+
requires-python = ">=3.8"
88
classifiers = [
99
"Programming Language :: Rust",
1010
"Programming Language :: Python :: Implementation :: CPython",

guide/src/getting_started.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,13 @@ To get started using PyO3 you will need three things: a Rust toolchain, a Python
44

55
## Rust
66

7-
First, make sure you have Rust installed on your system. If you haven't already done so, try following the instructions [here](https://www.rust-lang.org/tools/install). PyO3 runs on both the `stable` and `nightly` versions so you can choose whichever one fits you best. The minimum required Rust version is 1.48.
7+
First, make sure you have Rust installed on your system. If you haven't already done so, try following the instructions [here](https://www.rust-lang.org/tools/install). PyO3 runs on both the `stable` and `nightly` versions so you can choose whichever one fits you best. The minimum required Rust version is 1.56.
88

99
If you can run `rustc --version` and the version is new enough you're good to go!
1010

1111
## Python
1212

13-
To use PyO3, you need at least Python 3.7. While you can simply use the default Python interpreter on your system, it is recommended to use a virtual environment.
13+
To use PyO3, you need at least Python 3.8. While you can simply use the default Python interpreter on your system, it is recommended to use a virtual environment.
1414

1515
## Virtualenvs
1616

@@ -128,7 +128,7 @@ build-backend = "maturin"
128128

129129
[project]
130130
name = "pyo3_example"
131-
requires-python = ">=3.7"
131+
requires-python = ">=3.8"
132132
classifiers = [
133133
"Programming Language :: Rust",
134134
"Programming Language :: Python :: Implementation :: CPython",

guide/src/migration.md

+6
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,12 @@
33
This guide can help you upgrade code through breaking changes from one PyO3 version to the next.
44
For a detailed list of all changes, see the [CHANGELOG](changelog.md).
55

6+
## from 0.19.* to 0.20
7+
8+
### Drop support for older technologies
9+
10+
PyO3 0.20 has increased minimum Rust version to 1.56 and minimum Python version to 3.8. This enables use of newer language features and simplifies maintenance of the project.
11+
612
## from 0.18.* to 0.19
713

814
### Access to `Python` inside `__traverse__` implementations are now forbidden

noxfile.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@
1616

1717

1818
PYO3_DIR = Path(__file__).parent
19-
PY_VERSIONS = ("3.7", "3.8", "3.9", "3.10", "3.11")
20-
PYPY_VERSIONS = ("3.7", "3.8", "3.9")
19+
PY_VERSIONS = ("3.8", "3.9", "3.10", "3.11")
20+
PYPY_VERSIONS = ("3.8", "3.9")
2121

2222

2323
@nox.session(venv_backend="none")

pyo3-ffi/README.md

+2-3
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22

33
This crate provides [Rust](https://www.rust-lang.org/) FFI declarations for Python 3.
44
It supports both the stable and the unstable component of the ABI through the use of cfg flags.
5-
Python Versions 3.7+ are supported.
65
It is meant for advanced users only - regular PyO3 users shouldn't
76
need to interact with this crate at all.
87

@@ -13,8 +12,8 @@ Manual][capi] for up-to-date documentation.
1312
# Minimum supported Rust and Python versions
1413

1514
PyO3 supports the following software versions:
16-
- Python 3.7 and up (CPython and PyPy)
17-
- Rust 1.48 and up
15+
- Python 3.8 and up (CPython and PyPy)
16+
- Rust 1.56 and up
1817

1918
# Example: Building Python Native modules
2019

pyo3-ffi/src/lib.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -50,8 +50,8 @@
5050
//! # Minimum supported Rust and Python versions
5151
//!
5252
//! PyO3 supports the following software versions:
53-
//! - Python 3.7 and up (CPython and PyPy)
54-
//! - Rust 1.48 and up
53+
//! - Python 3.8 and up (CPython and PyPy)
54+
//! - Rust 1.56 and up
5555
//!
5656
//! # Example: Building Python Native modules
5757
//!

src/lib.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -121,8 +121,8 @@
121121
//! # Minimum supported Rust and Python versions
122122
//!
123123
//! PyO3 supports the following software versions:
124-
//! - Python 3.7 and up (CPython and PyPy)
125-
//! - Rust 1.48 and up
124+
//! - Python 3.8 and up (CPython and PyPy)
125+
//! - Rust 1.56 and up
126126
//!
127127
//! # Example: Building a native Python module
128128
//!

xtask/src/cli.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ use std::process::{Command, Output};
55
use std::time::Instant;
66
use structopt::StructOpt;
77

8-
pub const MSRV: &str = "1.48";
8+
pub const MSRV: &str = "1.56";
99

1010
#[derive(StructOpt)]
1111
pub enum Subcommand {

0 commit comments

Comments
 (0)