Skip to content

Commit d72609e

Browse files
Merge pull request #31 from ZeroIntensity/3.0.0
3.0.0
2 parents bd4f1d3 + f1c9ec5 commit d72609e

24 files changed

+1178
-4000
lines changed

.github/workflows/build.yml

+2-27
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,6 @@ on:
44
push:
55
tags:
66
- v*
7-
branches:
8-
- master
97
pull_request:
108
branches:
119
- master
@@ -34,7 +32,7 @@ jobs:
3432
fetch-depth: 0
3533

3634
- name: Build wheels
37-
uses: pypa/cibuildwheel@v2.3.1
35+
uses: pypa/cibuildwheel@v2.16.5
3836
env:
3937
CIBW_ARCHS_MACOS: x86_64
4038
HATCH_BUILD_HOOKS_ENABLE: "true"
@@ -45,28 +43,6 @@ jobs:
4543
path: wheelhouse/*.whl
4644
if-no-files-found: error
4745

48-
pure-python-wheel-and-sdist:
49-
name: Build a pure Python wheel and source distribution
50-
runs-on: ubuntu-latest
51-
52-
steps:
53-
- uses: actions/checkout@v2
54-
with:
55-
# Fetch all tags
56-
fetch-depth: 0
57-
58-
- name: Install build dependencies
59-
run: python -m pip install --upgrade build
60-
61-
- name: Build
62-
run: python -m build
63-
64-
- uses: actions/upload-artifact@v2
65-
with:
66-
name: artifacts
67-
path: dist/*
68-
if-no-files-found: error
69-
7046
binary-wheels-arm:
7147
name: Build Linux wheels for ARM
7248
runs-on: ubuntu-latest
@@ -88,7 +64,7 @@ jobs:
8864
platforms: arm64
8965

9066
- name: Build wheels
91-
uses: pypa/cibuildwheel@v2.3.1
67+
uses: pypa/cibuildwheel@v2.15.0
9268
env:
9369
CIBW_ARCHS_LINUX: aarch64
9470
HATCH_BUILD_HOOKS_ENABLE: "true"
@@ -103,7 +79,6 @@ jobs:
10379
name: Publish release
10480
needs:
10581
- binary-wheels-standard
106-
- pure-python-wheel-and-sdist
10782
- binary-wheels-arm
10883
runs-on: ubuntu-latest
10984
if: github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags')

.github/workflows/tests.yml

+8-5
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ on:
44
push:
55
branches:
66
- master
7-
- new-ci
87
pull_request:
98
branches:
109
- master
@@ -16,6 +15,7 @@ concurrency:
1615
env:
1716
PYTHONUNBUFFERED: "1"
1817
FORCE_COLOR: "1"
18+
PYTHONIOENCODING: "utf8"
1919

2020
jobs:
2121
run:
@@ -25,7 +25,7 @@ jobs:
2525
fail-fast: false
2626
matrix:
2727
os: [ubuntu-latest, windows-latest, macos-latest]
28-
python-version: ["3.7", "3.8", "3.9", "3.10"]
28+
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"]
2929

3030
steps:
3131
- uses: actions/checkout@v2
@@ -35,8 +35,11 @@ jobs:
3535
with:
3636
python-version: ${{ matrix.python-version }}
3737

38-
- name: Install Hatch
39-
run: pip install --upgrade --pre hatch
38+
- name: Install Ward
39+
run: pip install --upgrade --pre ward
40+
41+
- name: Install project
42+
run: pip install .
4043

4144
- name: Run tests
42-
run: hatch run tests
45+
run: ward

.gitignore

+2-1
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ vgcore.*
1313
_pointers.cpython*
1414
*.egg-info/
1515
wheelhouse/
16-
gen.py
1716
ext/
1817
*.o
18+
compile_flags.txt
19+
a.py

README.md

+17-6
Original file line numberDiff line numberDiff line change
@@ -22,20 +22,31 @@ print(text) # world hello
2222
```
2323

2424
```py
25-
from pointers import c_malloc as malloc, c_free as free, strcpy, printf
25+
from pointers import c_malloc, c_free, strcpy, printf
2626

27-
ptr = malloc(3)
27+
ptr = c_malloc(3)
2828
strcpy(ptr, "hi")
29-
printf("%s\n", ptr)
30-
free(ptr)
29+
printf("%s\n", ptr) # hi
30+
c_free(ptr)
31+
```
32+
33+
```py
34+
from pointers import malloc, free
35+
36+
my_str = malloc(103)
37+
my_str <<= "hi"
38+
second_str = my_str[51]
39+
second_str <<= "bye"
40+
print(*my_str, *second_str) # hi bye
41+
free(my_str)
3142
```
3243

3344
### Features
3445

3546
- Fully type safe
3647
- Pythonic pointer API
37-
- Bindings for the entire C standard library
38-
- Segfaults
48+
- Bindings for the entire C standard library and CPython ABI
49+
- Segfaults
3950

4051
### Why does this exist?
4152

docs/index.md

+1-9
Original file line numberDiff line numberDiff line change
@@ -36,19 +36,11 @@ fprintf(file, "hello world")
3636
fclose(file)
3737
```
3838

39-
### What's new in 2.0.0?
40-
41-
- Reworked documentation
42-
- Several bug fixes
43-
- Optimized internal API
44-
- Better and fixed type safety
45-
- New memory safety features
46-
4739
### Features
4840

4941
- Fully type safe
5042
- Pythonic pointer API
51-
- Bindings for the entire C standard library
43+
- Bindings for the entire C standard library and CPython ABI
5244
- Segfaults
5345

5446
### Why does this exist?

docs/reference.md

+1
Original file line numberDiff line numberDiff line change
@@ -12,3 +12,4 @@
1212
::: pointers.exceptions
1313
::: pointers.magic
1414
::: pointers._utils
15+
::: pointers.var_pointer

netlify.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
[build]
2-
command = "hatch run docs:build"
2+
command = "pip install mkdocs mkdocstrings[python] && mkdocs build"
33
publish = "site"

pyproject.toml

+4-2
Original file line numberDiff line numberDiff line change
@@ -12,16 +12,18 @@ readme = "README.md"
1212
license = { file = "LICENSE" }
1313
classifiers = [
1414
"Programming Language :: Python",
15-
"Programming Language :: Python :: 3.7",
1615
"Programming Language :: Python :: 3.8",
1716
"Programming Language :: Python :: 3.9",
1817
"Programming Language :: Python :: 3.10",
18+
"Programming Language :: Python :: 3.11",
19+
"Programming Language :: Python :: 3.12",
1920
"Programming Language :: Python :: Implementation :: CPython",
2021
]
2122
dependencies = [
2223
"typing_extensions",
24+
"varname"
2325
]
24-
version = "2.6.0"
26+
version = "3.0.0"
2527

2628
[project.urls]
2729
Documentation = "https://pointers.zintensity.dev"

0 commit comments

Comments
 (0)