Skip to content

Commit

Permalink
deps: add back experimental python 3.11 suppot
Browse files Browse the repository at this point in the history
  • Loading branch information
demberto committed Oct 26, 2022
1 parent 747375d commit 5034910
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 6 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
strategy:
matrix:
python-version:
["3.7", "3.8", "3.9", "3.10", "pypy3.7", "pypy3.8", "pypy3.9"]
["3.7", "3.8", "3.9", "3.10", "3.11", "pypy3.7", "pypy3.8", "pypy3.9"]
os: ["macos-latest", "windows-latest", "ubuntu-latest"]
steps:
- uses: actions/checkout@v3
Expand Down
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- `Delay.mod_x`, `Delay.mod_y`, `Delay.fat_mode` and `Delay.ping_pong` [#88].
- Improve enum performance by using `f-enum` library (`pyflp.parse` is 50% faster).
- `Time.gate`, `Time.shift` and `Time.full_porta` [#89].
- *Experimental* Python 3.11 support is back.

### Changed

Expand Down
7 changes: 5 additions & 2 deletions pyflp/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,9 @@
import io
import os
import pathlib
import sys

import construct as c
import fastenum

from ._events import (
DATA,
Expand All @@ -60,7 +60,10 @@
__all__ = ["parse", "save"]
__version__ = "2.0.0a4"

fastenum.enable()
if sys.version_info < (3, 11): # https://github.com/Bobronium/fastenum/issues/2
import fastenum

fastenum.enable() # 50% faster parse()


def parse(file: pathlib.Path | str) -> Project:
Expand Down
3 changes: 2 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ classifiers = [
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: Implementation :: CPython",
"Programming Language :: Python :: Implementation :: PyPy",
"Topic :: Multimedia",
Expand All @@ -27,7 +28,7 @@ classifiers = [
license = { text = "GPL-3.0" }
dependencies = [
"colour>=0.1.5",
"f-enum>=0.2.0",
"f-enum>=0.2.0;python_version<='3.10'",
"construct-typing @ git+https://github.com/timrid/construct-typing.git@ce871936d9e885c84f2f507c723fc5a7e99c9096",
"sortedcontainers>=2.4.0",
"typing_extensions>=4.4.0",
Expand Down
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
colour==0.1.5
construct-typing @ git+https://github.com/timrid/construct-typing.git@ce871936d9e885c84f2f507c723fc5a7e99c9096
f-enum==0.2.0
f-enum==0.2.0;python_version<="3.10"
sortedcontainers==2.4.0
typing_extensions==4.4.0
3 changes: 2 additions & 1 deletion tox.ini
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[tox]
envlist = py{37,38,39,310},pypy{37,38,39},docs,linters
envlist = py{37,38,39,310,311},pypy{37,38,39},docs,linters
minversion = 3.3.0
isolated_build = true
parallel = auto
Expand Down Expand Up @@ -79,6 +79,7 @@ python =
3.8: py38
3.9: py39
3.10: py310, docs
3.11: py311
pypy-3.7: pypy37
pypy-3.8: pypy38
pypy-3.9: pypy39

0 comments on commit 5034910

Please sign in to comment.