Skip to content

Commit

Permalink
Add Python 3.13 support; drop Python 3.7 support (#50)
Browse files Browse the repository at this point in the history
  • Loading branch information
MarshalX authored Oct 24, 2024
1 parent 2dd657d commit 7bf9fb9
Show file tree
Hide file tree
Showing 8 changed files with 25 additions and 26 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/codspeed.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: "3.12" # use the latest version of Python because it is faster
python-version: "3.13" # use the latest version of Python because it is faster

- name: Install python dependencies.
run: pip install -r pytests/requirements.txt
Expand Down
20 changes: 9 additions & 11 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,18 +29,18 @@ jobs:
- os: windows
target: i686
python-architecture: x86
interpreter: 3.7 3.8 3.9 3.10 3.11 3.12
interpreter: 3.8 3.9 3.10 3.11 3.12 3.13
- os: windows
target: aarch64
interpreter: 3.11 3.12
interpreter: 3.11 3.12 3.13

- os: macos
target: x86_64
interpreter: pypy3.8 pypy3.9 pypy3.10
- os: macos
target: aarch64
# actions/setup-python@v5 does not support 3.8 and 3.9 on arm64
interpreter: 3.7 3.8 3.9 pypy3.8 pypy3.9 pypy3.10
interpreter: 3.8 3.9 pypy3.8 pypy3.9 pypy3.10

- os: ubuntu
target: x86_64
Expand All @@ -51,13 +51,13 @@ jobs:
target: aarch64
- os: ubuntu
target: armv7
interpreter: 3.7 3.8 3.9 3.10 3.11 3.12
interpreter: 3.8 3.9 3.10 3.11 3.12 3.13
- os: ubuntu
target: ppc64le
interpreter: 3.7 3.8 3.9 3.10 3.11 3.12
interpreter: 3.8 3.9 3.10 3.11 3.12 3.13
- os: ubuntu
target: s390x
interpreter: 3.7 3.8 3.9 3.10 3.11 3.12
interpreter: 3.8 3.9 3.10 3.11 3.12 3.13

- os: ubuntu
target: x86_64
Expand Down Expand Up @@ -90,7 +90,7 @@ jobs:
target: ${{ matrix.target }}
manylinux: ${{ matrix.manylinux || 'auto' }}
container: ${{ matrix.container }}
args: --release --out dist --interpreter ${{ matrix.maturin-interpreter || matrix.interpreter || '3.7 3.8 3.9 3.10 3.11 3.12 pypy3.7 pypy3.8 pypy3.9 pypy3.10' }} ${{ matrix.extra-build-args }}
args: --release --out dist --interpreter ${{ matrix.maturin-interpreter || matrix.interpreter || '3.8 3.9 3.10 3.11 3.12 3.13 pypy3.8 pypy3.9 pypy3.10' }} ${{ matrix.extra-build-args }}
rust-toolchain: 1.76.0
docker-options: -e CI

Expand All @@ -109,10 +109,8 @@ jobs:
fail-fast: false
matrix:
os: [ ubuntu-latest, windows-latest, macos-12, macos-14 ]
interpreter: [ '3.7', '3.8', '3.9', '3.10', '3.11', '3.12' ]
interpreter: [ '3.8', '3.9', '3.10', '3.11', '3.12', '3.13' ]
exclude:
- os: macos-14
interpreter: '3.7'
# actions/setup-python@v5 does not support 3.8 and 3.9 on arm64
- os: macos-14
interpreter: '3.8'
Expand Down Expand Up @@ -207,7 +205,7 @@ jobs:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: '3.12'
python-version: '3.13'

- name: Get dist artifacts.
uses: actions/download-artifact@v4
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@ jobs:
- name: Set up Python.
uses: actions/setup-python@v5
with:
python-version: 3.7
# minimum supported version
python-version: 3.8

- name: Install dependencies.
run: |
Expand Down
8 changes: 4 additions & 4 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
[package]
name = "libipld"
version = "2.0.0"
version = "3.0.0"
edition = "2021"
license = "MIT"
description = "Python binding to the Rust IPLD library"
authors = ["Ilya (Marshal) <[email protected]>"]
keywords = ["python", "binding", "library", "lib", "ipld", "cid", "multibase", "multihash", "dag", "cbor", "json", "pb", "dag-cbor", "dag-json", "dag-pb"]
keywords = ["python", "binding", "library", "lib", "ipld", "cid", "multibase", "multihash", "dag", "cbor", "json", "pb", "dag-cbor", "dag-json"]

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
[lib]
name = "libipld"
crate-type = ["rlib", "cdylib"]

[dependencies]
pyo3 = { version = "0.22.2", features = ["generate-import-lib", "anyhow"] }
python3-dll-a = "0.2.7"
pyo3 = { version = "0.22.5", features = ["generate-import-lib", "anyhow"] }
python3-dll-a = "0.2.10"
anyhow = "1.0.75"
libipld = { version = "0.16.0", features = ["dag-cbor"] }
multibase = "0.9"
Expand Down
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIT License

Copyright (c) 2023 Ilya Siamionau
Copyright (c) 2024 Ilya Siamionau

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,11 +36,11 @@ print(libipld.encode_multibase('u', b'yes mani !'))
- Encode Multibase (`encode_multibase(str, bytes) -> str`). Accepts base and data.
- Decode CAR (`decode_car(bytes) -> tuple[dict, dict[bytes, dict]]`). Returns a header and blocks mapped by CID. CIDs in raw byte form.

Note: stub file will be provided in the future.
Note: a stub file will be provided in the future.

## Requirements

- Python 3.7 or higher.
- Python 3.8 or higher.

## Installing

Expand Down
6 changes: 3 additions & 3 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ authors = [
license = "MIT"
repository = "https://github.com/MarshalX/python-libipld"
readme = "README.md"
keywords = ["library", "lib", "ipld", "cid", "multibase", "multihash", "dag", "cbor", "json", "pb", "dag-cbor", "dag-json", "dag-pb"]
requires-python = ">=3.7"
keywords = ["library", "lib", "ipld", "cid", "multibase", "multihash", "dag", "cbor", "json", "pb", "dag-cbor", "dag-json"]
requires-python = ">=3.8"
classifiers = [
"Development Status :: 5 - Production/Stable",
"Intended Audience :: Developers",
Expand All @@ -20,12 +20,12 @@ classifiers = [
"Programming Language :: Python :: Implementation :: CPython",
"Programming Language :: Python :: Implementation :: PyPy",
"Programming Language :: Python :: 3 :: Only",
"Programming Language :: Python :: 3.7",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Topic :: Software Development",
"Topic :: Software Development :: Libraries :: Python Modules",
"Topic :: Software Development :: Pre-processors",
Expand Down
6 changes: 3 additions & 3 deletions pytests/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
pytest==7.4.4
pytest==8.3.3
pytest-benchmark==4.0.0
pytest-codspeed==2.2.0
pytest-xdist==3.5.0
pytest-codspeed==3.0.0b4
pytest-xdist==3.6.1

0 comments on commit 7bf9fb9

Please sign in to comment.