diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 9392beef..b2bc0bf1 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -16,7 +16,7 @@ jobs: matrix: # macos-13 is the last intel based runner os: [ubuntu-latest, macos-13, macos-latest, windows-latest] - python-version: ['3.9', '3.10', '3.11', '3.12'] + python-version: ['3.9', '3.10', '3.11', '3.12', '3.13'] defaults: run: shell: bash -el {0} diff --git a/opty-dev-env.yml b/opty-dev-env.yml index cfd64422..e2e073a0 100644 --- a/opty-dev-env.yml +++ b/opty-dev-env.yml @@ -11,6 +11,7 @@ dependencies: - numpydoc - pytest - pytest-cov + - python - scipy >=1.5.0 - sphinx - sphinx-gallery diff --git a/opty/direct_collocation.py b/opty/direct_collocation.py index 90783a50..67175244 100644 --- a/opty/direct_collocation.py +++ b/opty/direct_collocation.py @@ -1,5 +1,6 @@ #!/usr/bin/env python -# + +import sys from functools import wraps import logging @@ -77,7 +78,11 @@ def use_parent_doc(self, func, source): @staticmethod def _combine_docs(prob_doc, coll_doc): beg, end = prob_doc.split('bounds') - _, middle = coll_doc.split('Parameters\n ==========\n ') + if sys.version_info[1] >= 13: + sep = 'Parameters\n==========\n' + else: + sep = 'Parameters\n ==========\n ' + _, middle = coll_doc.split(sep) return beg + middle[:-9] + ' bounds' + end _doc_inherit = _DocInherit