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

Cis: use newer actions (setup-python, checkout, cache) #71

Merged
merged 3 commits into from
Jul 16, 2022
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
2 changes: 1 addition & 1 deletion .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ jobs:
steps:
- uses: actions/checkout@master
- name: Set up Python 3.8
uses: actions/setup-python@v2
uses: actions/setup-python@v4
with:
python-version: 3.8
- name: Install pypa/build
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,17 +15,17 @@ jobs:
matrix:
python-version: ['3.8','3.9','3.10']
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- name: Get history and tags for SCM versioning to work
run: |
git fetch --prune --unshallow
git fetch --depth=1 origin +refs/tags/*:refs/tags/*
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Cache pip dependencies
uses: actions/cache@v2
uses: actions/cache@v3
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }}
Expand Down
9 changes: 3 additions & 6 deletions tests/python_parser/test_syntax_error_handling.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,17 +44,14 @@ def parse_invalid_syntax(

# Check Python message but do not expect message to match for earlier Python versions
if sys.version_info >= min_python_version:
# NOTE ugly hack for 1 CPython bug
if exc_cls is SyntaxError and e.type is IndentationError:
assert message.replace("'", "") in py_exc.args[0]
else:
assert message in py_exc.args[0]
# This fails for Python < 3.10.5 but keeping the fix for a patch version is not
# worth it
assert message in py_exc.args[0]

print(str(e.exconly()))
assert message in str(e.exconly())

# Check start/end line/column on Python 3.10

for parser, exc in ([("Python", py_exc)] if sys.version_info >= min_python_version else []) + [
("pegen", e.value)
]:
Expand Down