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

Python 3.12 and 3.7 #1117

Merged
merged 4 commits into from
Oct 6, 2023
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
8 changes: 4 additions & 4 deletions .github/workflows/Draft-Release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,9 @@ defaults:
# + Thorough Windows builds
# + Oldest and newest cuda, lots of arch, vis off, tests on
# + Wheel producing manylinux builds
# + CUDA 11.2 and 12.0, py 3.7-11, vis on/off, py only.
# + CUDA 11.2 and 12.0, py 3.8-3.12, vis on/off, py only.
# + Wheel producing Windows builds
# + CUDA 11.2 and 12.0, py 3.7-11, vis on/off, py only.
# + CUDA 11.2 and 12.0, py 3.8-3.12, vis on/off, py only.
# + Draft github release workflow.

jobs:
Expand Down Expand Up @@ -319,11 +319,11 @@ jobs:
hostcxx: devtoolset-9
os: ubuntu-20.04
python:
- "3.12"
- "3.11"
- "3.10"
- "3.9"
- "3.8"
- "3.7"
config:
- name: "Release"
config: "Release"
Expand Down Expand Up @@ -479,11 +479,11 @@ jobs:
hostcxx: "Visual Studio 16 2019"
os: windows-2019
python:
- "3.12"
- "3.11"
- "3.10"
- "3.9"
- "3.8"
- "3.7"
config:
- name: "Release"
config: "Release"
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/Manylinux2014.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ jobs:
hostcxx: devtoolset-9
os: ubuntu-20.04
python:
- "3.11"
- "3.12"
config:
- name: "Release"
config: "Release"
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/Ubuntu.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ jobs:
hostcxx: gcc-8
os: ubuntu-20.04
python:
- "3.11"
- "3.12"
config:
- name: "Release"
config: "Release"
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/Windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ jobs:
hostcxx: "Visual Studio 16 2019"
os: windows-2019
python:
- "3.11"
- "3.12"
config:
- name: "Release"
config: "Release"
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ Optionally:

+ [cpplint](https://github.com/cpplint/cpplint) for linting code
+ [Doxygen](http://www.doxygen.nl/) to build the documentation
+ [Python](https://www.python.org/) `>= 3.7` for python integration
+ [Python](https://www.python.org/) `>= 3.8` for python integration
+ With `setuptools`, `wheel`, `build` and optionally `venv` python packages installed
+ [swig](http://www.swig.org/) `>= 4.0.2` for python integration
+ Swig `4.x` will be automatically downloaded by CMake if not provided (if possible).
Expand Down
4 changes: 2 additions & 2 deletions swig/python/codegen/codegen.py
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,7 @@ def dispatchMacroEnvFunction(self, tree, tree_parent):
bounds = tree_parent.args[1:]
# process bounds by appending to cpp function template arguments
for i in bounds:
if isinstance(i, ast.Num): # num required for python 3.7
if sys.version_info < (3,8,0) and isinstance(i, ast.Num): # num required for python 3.7
if not isinstance(i.n, int):
self.RaiseError(tree, f" Macro environment function argument '{i}' should be an integer value.")
cpp_func_name += f", {i.n}"
Expand Down Expand Up @@ -585,7 +585,7 @@ def _Expr(self, tree):
if isinstance(tree.value.value, str):
return
# catch special case of Python 3.7 Where doc string is a Str and not a Constant
elif isinstance(tree.value, ast.Str):
elif sys.version_info < (3,8,0) and isinstance(tree.value, ast.Str): # num required for python 3.7
return
# otherwise treat like a normal expression
self.fill()
Expand Down