diff --git a/.github/workflows/automation.yml b/.github/workflows/automation.yml index 12d4e197..7206e728 100644 --- a/.github/workflows/automation.yml +++ b/.github/workflows/automation.yml @@ -15,7 +15,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - python-version: ['3.10', '3.11', '3.12'] + python-version: ['3.10', '3.11', '3.12', '3.13'] steps: - uses: actions/checkout@v4 diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index c7b63636..1fb666c5 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -45,7 +45,7 @@ jobs: strategy: fail-fast: false matrix: - python-version: ["3.10", "3.11", "3.12"] + python-version: ["3.10", "3.11", "3.12", "3.13"] steps: - name: Checkout diff --git a/pyproject.toml b/pyproject.toml index e59f5b83..1de32865 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -37,6 +37,7 @@ classifiers = [ "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12", + "Programming Language :: Python :: 3.13", "Operating System :: POSIX :: Linux", "Typing :: Typed", ] @@ -93,7 +94,7 @@ cortex = ["py.typed"] [tool.black] line-length = 100 -target-version = ["py310", "py311", "py312"] +target-version = ["py310", "py311", "py312", "py313"] exclude = ''' /( \.eggs diff --git a/setup.py b/setup.py index 3a218042..750b0629 100644 --- a/setup.py +++ b/setup.py @@ -41,6 +41,7 @@ "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12", + "Programming Language :: Python :: 3.13", "Operating System :: POSIX :: Linux", ], python_requires=">=3.10", diff --git a/tests/benchmark_313.py b/tests/benchmark_313.py new file mode 100644 index 00000000..15464c74 --- /dev/null +++ b/tests/benchmark_313.py @@ -0,0 +1,33 @@ +"""Cortex Python 3.13 Benchmark - Issue #272 +To run benchmarks: +# Install PyYAML (only dep needed) +pip install pyyaml +# Test both versions +python3.11 benchmark_313.py +python3.13 benchmark_313.py +""" + +import sys +import timeit + +print(f"=== Cortex Python {sys.version_info.major}.{sys.version_info.minor} Benchmark ===\n") + +yaml_ops = """ +import yaml +data = {f'test_{i}': i for i in range(100)} +yaml.dump(data) +""" +time_yaml = timeit.timeit(yaml_ops, number=1000) +print(f"āœ“ YAML Dump (1000x): {time_yaml:.4f}s") + +# Dict operations (common Cortex patterns) +dict_ops = """ +d = {i: i*2 for i in range(100)} +result = [v for k,v in d.items() if v > 50] +""" +time_dicts = timeit.timeit(dict_ops, number=1000) +print(f"āœ“ Dict Operations (1000x): {time_dicts:.4f}s") + +total = time_yaml + time_dicts +print(f"\nāœ… Total Time: {total:.4f}s") +print(f"āœ… Python {sys.version_info.major}.{sys.version_info.minor} = COMPATIBLE!")