Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 13 additions & 7 deletions .github/workflows/cibuildwheel.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,18 @@
name: Build
name: Build wheels

on:
push:
tags:
# ytf did they invent their own syntax that's almost regex?
# ** matches 'zero or more of any character'
- 'release-v[0-9]+.[0-9]+.[0-9]+**'
- 'prerelease-v[0-9]+.[0-9]+.[0-9]+**'
branches: [master]
pull_request:
branches: ["*"]
workflow_dispatch: # allows you to trigger manually

# When this workflow is queued, automatically cancel any previous running
# or pending jobs from the same branch
concurrency:
group: Build-${{ github.ref }}
cancel-in-progress: true

jobs:
build_wheels:
uses: explosion/gha-cibuildwheel/.github/workflows/cibuildwheel.yml@main
Expand All @@ -16,6 +22,6 @@ jobs:
with:
wheel-name-pattern: "srsly-*.whl"
pure-python: false
create-release: ${{ startsWith(github.ref, 'refs/tags/release-') || startsWith(github.ref, 'refs/tags/prerelease-') }}
secrets:
gh-token: ${{ secrets.GITHUB_TOKEN }}

33 changes: 16 additions & 17 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
@@ -1,39 +1,38 @@
name: tests
name: Test

on:
push:
tags-ignore:
- '**'
paths-ignore:
- "*.md"
- ".github/cibuildwheel.yml"
- ".github/publish_pypi.yml"
branches: [master]
pull_request:
types: [opened, synchronize, reopened, edited]
paths-ignore:
- "*.md"
- ".github/cibuildwheel.yml"
- ".github/publish_pypi.yml"
branches: ["*"]
workflow_dispatch: # allows you to trigger manually

# When this workflow is queued, automatically cancel any previous running
# or pending jobs from the same branch
concurrency:
group: Test-${{ github.ref }}
cancel-in-progress: true

env:
MODULE_NAME: 'srsly'
RUN_MYPY: 'false'

jobs:
tests:
name: Test
if: github.repository_owner == 'explosion'
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest]
python_version: ["3.9", "3.10", "3.11", "3.12"]
# FIXME: ujson segfault on 3.14
python_version: ["3.9", "3.10", "3.11", "3.12", "3.13"]
runs-on: ${{ matrix.os }}

steps:
- name: Check out repo
uses: actions/checkout@v3
uses: actions/checkout@v5

- name: Configure Python version
uses: actions/setup-python@v4
uses: actions/setup-python@v6
with:
python-version: ${{ matrix.python_version }}
architecture: x64
Expand Down
8 changes: 6 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,13 +1,17 @@
[build-system]
requires = [
"setuptools",
"cython>=0.25",
"cython>=0.29.1",
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

align to setup.cfg

]
build-backend = "setuptools.build_meta"

[tool.cibuildwheel]
build = "*"
skip = "cp38*"
skip = [
"cp38*", # Obsolete
"cp314-*", # FIXME ujson segfaults
"cp314t-*", # TODO free-threading support (note: 3.13t is skipped by default)
]
test-skip = ""

archs = ["native"]
Expand Down
3 changes: 2 additions & 1 deletion setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,8 @@ classifiers =
[options]
zip_safe = true
include_package_data = true
python_requires = >=3.9,<3.15
# FIXME ujson segfaults on 3.14
python_requires = >=3.9,<3.14
setup_requires =
cython>=0.29.1
install_requires =
Expand Down
6 changes: 5 additions & 1 deletion srsly/tests/cloudpickle/cloudpickle_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,11 @@ def method_c(self):
return "c"

clsdict = _extract_class_dict(C)
assert sorted(clsdict.keys()) == ["C_CONSTANT", "__doc__", "method_c"]
if sys.version_info >= (3, 13):
expected_keys = ["C_CONSTANT", "__doc__", "__firstlineno__", "method_c"]
else:
expected_keys = ["C_CONSTANT", "__doc__", "method_c"]
assert sorted(clsdict) == expected_keys
assert clsdict["C_CONSTANT"] == 43
assert clsdict["__doc__"] is None
assert clsdict["method_c"](C()) == C().method_c()
Expand Down
Loading