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

Migrate to setup-python in GitHub Actions (and enable 3.13 tox builds). #214

Merged
merged 2 commits into from
Nov 12, 2024
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.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 18 additions & 6 deletions .github/workflows/tox.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,14 +21,26 @@ jobs:
PANDAS_PRESENCE: ${{ matrix.pandas-presence }}
steps:
- uses: actions/checkout@v2
- uses: gabrielfalcao/pyenv-action@v17
- name: Set up Python ${{ matrix.python-version }}
id: gha-python
uses: actions/setup-python@v4
with:
default: "${{ matrix.python-version }}"
- name: Install Python ${{ matrix.python-version }}
python-version: ${{ matrix.python-version }}
continue-on-error: true
- name: Install PyEnv
if: ${{ steps.gha-python.outcome == 'failure' }}
run: |
pyenv install "${{ matrix.python-version }}"
pyenv local "${{ matrix.python-version }}"
pyenv versions
curl https://pyenv.run | bash
PYENV_ROOT="$HOME/.pyenv"
echo "$PYENV_ROOT/bin" >> $GITHUB_PATH
echo "$PYENV_ROOT/shims" >> $GITHUB_PATH
echo "PYENV_ROOT=$PYENV_ROOT" >> $GITHUB_ENV
- name: Install Python ${{ matrix.python-version }} using PyEnv
if: ${{ steps.gha-python.outcome == 'failure' }}
run: |
pyenv install "${{ matrix.python-version }}"
pyenv local "${{ matrix.python-version }}"
pyenv versions
- name: Install dependencies
run: |
pip install -U pip
Expand Down
8 changes: 8 additions & 0 deletions patsy/eval.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
import tokenize
import ast
import numbers
import pytest
from patsy import PatsyError
from patsy.util import PushbackAdapter, no_pickling, assert_no_pickling
from patsy.tokens import pretty_untokenize, normalize_token_spacing, python_tokenize
Expand Down Expand Up @@ -423,6 +424,13 @@ def test_EvalEnvironment_subset():
pytest.raises(NameError, subset_bc.eval, "a")


@pytest.mark.skipif(
sys.version_info >= (3, 13),
reason=(
"`frame.f_locals` may return write-through proxies in Python 3.13+, "
"breaking direct comparison by ids."
),
)
def test_EvalEnvironment_eq():
# Two environments are eq only if they refer to exactly the same
# global/local dicts
Expand Down
3 changes: 2 additions & 1 deletion tox.ini
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[tox]
envlist = {py36,py37,py38,py39,py310,py311,py312}-{with_pandas,without_pandas}
envlist = {py36,py37,py38,py39,py310,py311,py312,py313}-{with_pandas,without_pandas}

[gh-actions]
python =
Expand All @@ -10,6 +10,7 @@ python =
3.10: py310
3.11: py311
3.12: py312
3.13: py313

[testenv]
deps=
Expand Down
Loading