Skip to content

Commit

Permalink
WIP upgrade to Python 3.10
Browse files Browse the repository at this point in the history
  • Loading branch information
gilch committed Sep 29, 2024
1 parent 4f21211 commit 557769b
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 12 deletions.
12 changes: 8 additions & 4 deletions .github/workflows/test-package.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# This configuration file is part of the Hissp source code repository,
# copyright 2019, 2021, 2022 Matthew Egan Odendahl
# copyright 2019, 2021, 2022, 2024 Matthew Egan Odendahl
# SPDX-License-Identifier: Apache-2.0
name: Test package

Expand All @@ -15,10 +15,10 @@ jobs:
uses: actions/checkout@v2
- name: Lint with black
uses: psf/black@stable
- name: Set up Python 3.8
- name: Set up Python 3.10.15
uses: actions/setup-python@v1
with:
python-version: 3.8
python-version: 3.10.15
- name: Cache pip
uses: actions/cache@v1
with:
Expand Down Expand Up @@ -55,7 +55,11 @@ jobs:
pip install -r requirements-dev.txt
- name: Test install with pytest (including doctests)
env:
PYTHONWARNINGS: error
# Upgrades warnings to errors, so they get noticed.
# Currently turns off some in libraries due to Python 3.10 upgrade.
# These are not due to issues in Hissp itself, which has no dependencies.
# TODO: try upgrading libraries affected by deprecations.
PYTHONWARNINGS: error,default:SelectableGroups:DeprecationWarning:hypothesis.entry_points,default:A private pytest:DeprecationWarning:sybil.integration.pytest
run: |
python -c "import tests" # Compiles hissp.basic on package import.
pytest -p no:cacheprovider -v --cov=hissp --cov-report=xml --doctest-modules --doctest-glob *.md src/hissp/*.lissp tests/ docs/ $(python -c "import hissp; print(hissp.__path__[0])")
Expand Down
4 changes: 2 additions & 2 deletions docs/macro_tutorial.rst
Original file line number Diff line number Diff line change
Expand Up @@ -349,8 +349,8 @@ That worked, but can we use it?
Traceback (most recent call last):
...
squares = map(L x: x * x, range(10))
^
SyntaxError: invalid syntax
^^^
SyntaxError: invalid syntax. Perhaps you forgot a comma?
Another syntax error.
No surprise.
Expand Down
6 changes: 3 additions & 3 deletions requirements-dev.txt
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
# This configuration file is part of Hissp's test suite,
# Copyright 2019, 2021, 2022 Matthew Egan Odendahl
# Copyright 2019, 2021, 2022, 2024 Matthew Egan Odendahl
# SPDX-License-Identifier: Apache-2.0
hypothesis==5.43.3
coverage==5.3
pytest==6.1.2
pytest==6.2.5
pytest-cov==2.10.1
sybil==2.0.1
sphinx==4.2.0
sphinx==6.2.1
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
"Operating System :: POSIX",
"Operating System :: Unix",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.10",
"Programming Language :: Lisp",
"Topic :: Software Development",
"Topic :: Software Development :: Code Generators",
Expand Down
4 changes: 2 additions & 2 deletions src/hissp/macros.lissp
Original file line number Diff line number Diff line change
Expand Up @@ -1680,7 +1680,7 @@ Hidden doctest adds bundled macros for REPL-consistent behavior.
;; ... 'Hi'),
;; ... _Qzwg5wn73w__target) [-1]
;; ... )()
;; namespace(a=1, attach=<function _macro_.attach at 0x...>, b='Hi')
;; namespace(attach=<function _macro_.attach at 0x...>, a=1, b='Hi')
;;
;; See also: `setattr`, `set@ <setQzAT_>`, `vars`.
;;
Expand Down Expand Up @@ -2424,7 +2424,7 @@ Hidden doctest adds bundled macros for REPL-consistent behavior.
;;
;; #> Q#2/3
;; >>> # Fraction(2, 3)
;; ... __import__('pickle').loads(b'cfractions\nFraction\n(I2\nI3\ntR.')
;; ... __import__('pickle').loads(b'cfractions\nFraction\n(V2/3\ntR.')
;; Fraction(2, 3)
;;
(fractions..Fraction (hissp..demunge Q)))
Expand Down

0 comments on commit 557769b

Please sign in to comment.