Skip to content

Commit

Permalink
chore: enable Python 3.11 build (#8)
Browse files Browse the repository at this point in the history
  • Loading branch information
XuehaiPan authored Oct 27, 2022
1 parent b3bdf58 commit ed27339
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 15 deletions.
15 changes: 6 additions & 9 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ jobs:
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: "3.7 - 3.10"
python-version: "3.7 - 3.11"
update-environment: true

- name: Set __release__
Expand Down Expand Up @@ -96,7 +96,6 @@ jobs:
fetch-depth: 0

- name: Set up Python
id: py
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
Expand All @@ -115,7 +114,7 @@ jobs:
run: python .github/workflows/set_cibw_build.py

- name: Build wheels
uses: pypa/[email protected].1
uses: pypa/[email protected].2
env:
CIBW_BUILD: ${{ env.CIBW_BUILD }}
with:
Expand All @@ -137,7 +136,7 @@ jobs:
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
python-version: ['3.8', '3.9', '3.10']
python-version: ['3.8', '3.9', '3.10', '3.11']
fail-fast: false
timeout-minutes: 30
steps:
Expand All @@ -148,7 +147,6 @@ jobs:
fetch-depth: 0

- name: Set up Python
id: py
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
Expand All @@ -167,7 +165,7 @@ jobs:
run: python .github/workflows/set_cibw_build.py

- name: Build wheels
uses: pypa/[email protected].1
uses: pypa/[email protected].2
env:
CIBW_BUILD: ${{ env.CIBW_BUILD }}
with:
Expand Down Expand Up @@ -200,7 +198,7 @@ jobs:
uses: actions/setup-python@v4
if: startsWith(github.ref, 'refs/tags/')
with:
python-version: "3.7 - 3.10"
python-version: "3.7 - 3.11"
update-environment: true

- name: Set __release__
Expand Down Expand Up @@ -246,8 +244,7 @@ jobs:
path: dist

- name: List distributions
run:
ls -lh dist/*
run: ls -lh dist/*

- name: Publish to TestPyPI
if: startsWith(github.ref, 'refs/tags/') || github.event_name == 'workflow_dispatch'
Expand Down
6 changes: 2 additions & 4 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ jobs:
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
python-version: ['3.7']
python-version: ["3.7"]
fail-fast: false
timeout-minutes: 30
steps:
Expand All @@ -44,7 +44,6 @@ jobs:
fetch-depth: 1

- name: Set up Python
id: py
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
Expand Down Expand Up @@ -81,7 +80,7 @@ jobs:
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
python-version: ['3.6', '3.8', '3.9', '3.10']
python-version: ["3.6", "3.8", "3.9", "3.10", "3.11"]
fail-fast: false
timeout-minutes: 30
steps:
Expand All @@ -92,7 +91,6 @@ jobs:
fetch-depth: 1

- name: Set up Python
id: py
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ There are several limitations of the pytree type registry:
1. **The type registry is per-interpreter-dependent.** This means registering a custom type in the registry affects all modules that use OpTree. The type registry does not support per-module isolation such as namespaces.
2. **The elements in the type registry are immutable.** Users either cannot register the same type twice (i.e., update the type registry). Nor cannot remove a type from the type registry.
3. **Users cannot modify the behavior of already registered built-in types** listed [Built-in PyTree Node Types](#built-in-pytree-node-types), such as key order sorting for `dict` and `collections.defaultdict`.
4. **Inherited subclasses are not implicitly registered.** The registration lookup uses `type(obj) is registered_type` rather than `isinstance(obj, registered_type)`. Users need to explicitly register all custom classes explicitly.
4. **Inherited subclasses are not implicitly registered.** The registration lookup uses `type(obj) is registered_type` rather than `isinstance(obj, registered_type)`. Users need to register the subclasses explicitly.

### `None` is non-leaf Node vs. `None` is Leaf

Expand Down
3 changes: 2 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ classifiers = [
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Operating System :: Microsoft :: Windows",
"Operating System :: POSIX :: Linux",
"Operating System :: MacOS",
Expand Down Expand Up @@ -88,7 +89,7 @@ test-command = """make -C "{project}" test PYTHON=python"""
safe = true
line-length = 100
skip-string-normalization = true
target-version = ["py36", "py37", "py38", "py39", "py310"]
target-version = ["py36", "py37", "py38", "py39", "py310", "py311"]

[tool.isort]
profile = "black"
Expand Down

0 comments on commit ed27339

Please sign in to comment.