Skip to content

Commit

Permalink
Merge pull request #535 from nucleic/312-support
Browse files Browse the repository at this point in the history
Python 3.12 support
  • Loading branch information
MatthieuDartiailh committed Nov 15, 2023
2 parents a680089 + 40be8ec commit 430ee71
Show file tree
Hide file tree
Showing 20 changed files with 7,988 additions and 5,227 deletions.
14 changes: 10 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,15 +23,23 @@ jobs:
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
python-version: ['3.8', '3.9', '3.10', '3.11.2 - 3.12']
python-version: ['3.8', '3.9', '3.10', '3.11', '3.12']
qt-version: [5, 6]
qt-binding: [pyqt, pyside]
exclude:
- python-version: '3.10'
qt-version: 5
qt-binding: pyside
- python-version: '3.11.2 - 3.12'
# Segfaults on exit on all OSes (11/2023)
- python-version: '3.12'
qt-version: 6
qt-binding: pyside
- python-version: '3.11'
qt-version: 5
- python-version: '3.12'
qt-version: 5
- python-version: '3.9'
qt-version: 6
- python-version: '3.8'
qt-version: 6
- os: ubuntu-latest
Expand Down Expand Up @@ -68,8 +76,6 @@ jobs:
python -m pip install --upgrade pip
pip install setuptools-scm[toml]
pip install numpy
pip install git+https://github.com/we-like-parsers/pegen --no-deps
pip install git+https://github.com/MatthieuDartiailh/bytecode@main
pip install git+https://github.com/nucleic/cppy@main
pip install git+https://github.com/nucleic/atom@main
pip install git+https://github.com/nucleic/kiwi@main
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ jobs:
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.10'
python-version: '3.11'
cache: 'pip'
cache-dependency-path: 'docs/requirements.txt'
- name: Install dependencies
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ jobs:
strategy:
matrix:
os: [windows-latest, ubuntu-latest, macos-latest]
python: [38, 39, 310, 311]
python: [38, 39, 310, 311, 312]
steps:
- name: Checkout
uses: actions/checkout@v4
Expand All @@ -56,7 +56,7 @@ jobs:
- name: Setup Python
uses: actions/setup-python@v4
with:
python-version: '3.9'
python-version: '3.11'
- name: Install cibuildwheel
run: |
python -m pip install --upgrade pip
Expand Down
2 changes: 1 addition & 1 deletion docs/source/dev_guides/languagebasedtools.rst
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ Pygments is an open-source generic syntax highlighter. It is used by
An Enaml lexer for Pygments is available at ``tools/pygments``.

To install, change into the ``./tools/pygments`` directory, and run
``python setup.py install``.
``pip install -e .``.

Alternatively, it can be installed directly from `PyPi`_: ``pip install pygments-enaml``

Expand Down
3 changes: 3 additions & 0 deletions enaml/compat.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,13 @@

PY311 = sys.version_info >= (3, 11)

PY312 = sys.version_info >= (3, 12)

# Functions used to update the co_filename slot of a code object
# Available in Python 3.5+ (tested up to 3.8)
from _imp import _fix_co_filename


def update_code_co_filename(code, src_path):
"""Update the co_filename attribute of the code.
Expand Down

0 comments on commit 430ee71

Please sign in to comment.