Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: enable Python 3.11 build #8

Merged
merged 2 commits into from Oct 27, 2022
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.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
15 changes: 6 additions & 9 deletions .github/workflows/build.yml
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/cibuildwheel@v2.11.1
uses: pypa/cibuildwheel@v2.11.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/cibuildwheel@v2.11.1
uses: pypa/cibuildwheel@v2.11.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
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
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
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