Skip to content

Commit db39717

Browse files
committed
Merge branch 'main' into bufsize-argument
2 parents edb61db + 526ec9c commit db39717

35 files changed

+390
-313
lines changed

.github/workflows/docs.yaml

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
name: docs
2+
3+
on: ["push", "pull_request"]
4+
5+
jobs:
6+
docs:
7+
# We want to run on external PRs, but not on our own internal PRs as they'll be run
8+
# by the push to the branch.
9+
if: github.event_name == 'push' || github.event.pull_request.head.repo.full_name != github.repository
10+
11+
runs-on: ubuntu-latest
12+
steps:
13+
- name: Checkout
14+
uses: actions/checkout@v4
15+
16+
- name: Setup Python
17+
uses: actions/setup-python@v5
18+
with:
19+
python-version: '3.x'
20+
cache: "pip"
21+
cache-dependency-path: |
22+
requirements.txt
23+
docs/requirements.txt
24+
25+
- name: Build
26+
run: |
27+
pip install -r requirements.txt
28+
make cython
29+
30+
- name: Sphinx Documentation Generator
31+
run: |
32+
pip install -r docs/requirements.txt
33+
make docs
Lines changed: 9 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,22 @@
1-
name: Black
1+
name: lint
22

33
on: ["push", "pull_request"]
44

55
jobs:
6-
black:
6+
lint:
77
# We want to run on external PRs, but not on our own internal PRs as they'll be run
88
# by the push to the branch.
99
if: github.event_name == 'push' || github.event.pull_request.head.repo.full_name != github.repository
1010

1111
runs-on: ubuntu-latest
1212
steps:
13-
- name: Setup Python
14-
uses: actions/setup-python@v4
15-
with:
16-
python-version: '3.x'
17-
architecture: 'x64'
18-
1913
- name: Checkout
20-
uses: actions/checkout@v3
14+
uses: actions/checkout@v4
15+
16+
- name: ruff check
17+
run: |
18+
pipx run ruff check --diff msgpack/ test/ setup.py
2119
22-
- name: Black Code Formatter
20+
- name: ruff format
2321
run: |
24-
pip install black==22.3.0
25-
black -S --diff --check msgpack/ test/ setup.py
22+
pipx run ruff format --diff msgpack/ test/ setup.py

.github/workflows/test.yml

Lines changed: 16 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,19 +10,20 @@ jobs:
1010
strategy:
1111
matrix:
1212
os: ["ubuntu-latest", "windows-latest", "macos-latest"]
13-
py: ["3.11", "3.10", "3.9", "3.8", "3.7"]
13+
py: ["3.13-dev", "3.12", "3.11", "3.10", "3.9", "3.8"]
1414

1515
runs-on: ${{ matrix.os }}
1616
name: Run test with Python ${{ matrix.py }} on ${{ matrix.os }}
1717

1818
steps:
1919
- name: Checkout
20-
uses: actions/checkout@v3
20+
uses: actions/checkout@v4
2121

2222
- name: Set up Python
23-
uses: actions/setup-python@v4
23+
uses: actions/setup-python@v5
2424
with:
2525
python-version: ${{ matrix.py }}
26+
allow-prereleases: true
2627
cache: "pip"
2728

2829
- name: Build
@@ -41,3 +42,15 @@ jobs:
4142
shell: bash
4243
run: |
4344
MSGPACK_PUREPYTHON=1 pytest -v test
45+
46+
- name: build packages
47+
shell: bash
48+
run: |
49+
pip install build
50+
python -m build
51+
52+
- name: upload packages
53+
uses: actions/upload-artifact@v4
54+
with:
55+
name: dist-${{ matrix.os }}-${{ matrix.py }}
56+
path: dist

.github/workflows/wheel.yml

Lines changed: 17 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ on:
33
push:
44
branches: [main]
55
create:
6+
workflow_dispatch:
67

78
jobs:
89
build_wheels:
@@ -13,38 +14,42 @@ jobs:
1314
name: Build wheels on ${{ matrix.os }}
1415

1516
steps:
16-
- name: Checkout
17-
uses: actions/checkout@v3
18-
1917
- name: Set up QEMU
2018
if: runner.os == 'Linux'
21-
uses: docker/setup-qemu-action@v1
19+
uses: docker/setup-qemu-action@v3
2220
with:
23-
platforms: arm64
21+
platforms: all
2422

25-
- name: Set up Python 3.x
26-
uses: actions/setup-python@v4
23+
- uses: actions/checkout@v4
24+
- uses: actions/setup-python@v5
2725
with:
2826
python-version: "3.x"
2927
cache: "pip"
30-
31-
- name: Prepare
28+
- name: Cythonize
3229
shell: bash
3330
run: |
3431
pip install -r requirements.txt
3532
make cython
3633
3734
- name: Build
38-
uses: pypa/cibuildwheel@v2.12.0
35+
uses: pypa/cibuildwheel@v2.17.0
3936
env:
4037
CIBW_TEST_REQUIRES: "pytest"
4138
CIBW_TEST_COMMAND: "pytest {package}/test"
4239
CIBW_ARCHS_LINUX: auto aarch64
4340
CIBW_ARCHS_MACOS: x86_64 universal2 arm64
4441
CIBW_SKIP: pp*
4542

43+
- name: Build pure Python wheel
44+
if: runner.os == 'Linux'
45+
env:
46+
MSGPACK_PUREPYTHON: "1"
47+
run: |
48+
pip install build
49+
python -m build -w -o wheelhouse
50+
4651
- name: Upload Wheels to artifact
47-
uses: actions/upload-artifact@v1
52+
uses: actions/upload-artifact@v4
4853
with:
49-
name: Wheels
54+
name: wheels-${{ matrix.os }}
5055
path: wheelhouse

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ MANIFEST
22
build/*
33
dist/*
44
.tox
5+
.python-version
56
*.pyc
67
*.pyo
78
*.so

.readthedocs.yaml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
# Read the Docs configuration file for Sphinx projects.
2+
# See https://docs.readthedocs.io/en/stable/config-file/v2.html for details.
3+
4+
version: 2
5+
6+
build:
7+
os: ubuntu-22.04
8+
tools:
9+
python: "3.11"
10+
apt_packages:
11+
- build-essential
12+
jobs:
13+
pre_install:
14+
- pip install -r requirements.txt
15+
- make cython
16+
17+
python:
18+
install:
19+
- method: pip
20+
path: .
21+
- requirements: docs/requirements.txt
22+
23+
sphinx:
24+
configuration: docs/conf.py

ChangeLog.rst

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,35 @@
1+
1.0.8
2+
=====
3+
4+
Release Date: 2024-03-01
5+
6+
* Update Cython to 3.0.8. This fixes memory leak when iterating
7+
``Unpacker`` object on Python 3.12.
8+
* Do not include C/Cython files in binary wheels.
9+
10+
11+
1.0.7
12+
=====
13+
14+
Release Date: 2023-09-28
15+
16+
* Fix build error of extension module on Windows. (#567)
17+
* ``setup.py`` doesn't skip build error of extension module. (#568)
18+
19+
20+
1.0.6
21+
=====
22+
23+
Release Date: 2023-09-21
24+
25+
.. note::
26+
v1.0.6 Wheels for Windows don't contain extension module.
27+
Please upgrade to v1.0.7 or newer.
28+
29+
* Add Python 3.12 wheels (#517)
30+
* Remove Python 2.7, 3.6, and 3.7 support
31+
32+
133
1.0.5
234
=====
335

DEVELOP.md

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,5 @@
11
# Developer's note
22

3-
## Wheels
4-
5-
Wheels for macOS and Linux are built on Travis and AppVeyr, in
6-
[methane/msgpack-wheels](https://github.com/methane/msgpack-wheels) repository.
7-
8-
Wheels for Windows are built on Github Actions in this repository.
9-
10-
113
### Build
124

135
```

Makefile

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,17 +4,25 @@ PYTHON_SOURCES = msgpack test setup.py
44
all: cython
55
python setup.py build_ext -i -f
66

7-
.PHONY: black
8-
black:
9-
black $(PYTHON_SOURCES)
7+
.PHONY: format
8+
format:
9+
pipx run ruff format $(PYTHON_SOURCES)
10+
11+
.PHONY: lint
12+
lint:
13+
pipx run ruff check $(PYTHON_SOURCES)
14+
15+
.PHONY: doc
16+
doc:
17+
cd docs && sphinx-build -n -v -W --keep-going -b html -d doctrees . html
1018

1119
.PHONY: pyupgrade
1220
pyupgrade:
1321
@find $(PYTHON_SOURCES) -name '*.py' -type f -exec pyupgrade --py37-plus '{}' \;
1422

1523
.PHONY: cython
1624
cython:
17-
cython --cplus msgpack/_cmsgpack.pyx
25+
cython msgpack/_cmsgpack.pyx
1826

1927
.PHONY: test
2028
test: cython

0 commit comments

Comments
 (0)