Skip to content

Commit

Permalink
ci: support python 3.12
Browse files Browse the repository at this point in the history
  • Loading branch information
dlshriver committed Jul 31, 2023
1 parent 184b2f4 commit c38c59d
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 1 deletion.
5 changes: 4 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:
tests:
strategy:
matrix:
python-version: ["3.7", "3.8", "3.9", "3.10", "3.11"]
python-version: ["3.7", "3.8", "3.9", "3.10", "3.11", "3.12"]
os: [ubuntu-latest, windows-latest]
runs-on: ${{ matrix.os }}
steps:
Expand All @@ -33,6 +33,9 @@ jobs:
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
allow-prereleases: true
cache: pip
cache-dependency-path: "pyproject.toml"

- name: Install Intercepts
shell: bash
Expand Down
12 changes: 12 additions & 0 deletions intercepts/registration.py
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,18 @@ def _register_function(
bytes(
[dis.opmap["PUSH_NULL"], 0] + load_const + [dis.opmap["NOP"], 0] * 4
),
).replace(
bytes(
[
dis.opmap["LOAD_GLOBAL"],
(_index << 1) + 1,
*([dis.opmap["CACHE"], 0] * 4),
]
),
# Need the NOPs to prevent segfaults with coveragepy and pytest
bytes(
[dis.opmap["PUSH_NULL"], 0] + load_const + [dis.opmap["NOP"], 0] * 3
),
)
if _PYTHON_VERSION < (3, 8):
_code = types.CodeType(
Expand Down

0 comments on commit c38c59d

Please sign in to comment.