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

String split is failing on Python 3.13 #225

Open
moorepants opened this issue Sep 10, 2024 · 0 comments
Open

String split is failing on Python 3.13 #225

moorepants opened this issue Sep 10, 2024 · 0 comments
Labels

Comments

@moorepants
Copy link
Member

The 3.13 builds failed on conda forge, see conda-forge/opty-feedstock#33

This is the traceback:

+ python betts2003.py
Traceback (most recent call last):
  File "/home/conda/feedstock_root/build_artifacts/opty_1725960370278/test_tmp/betts2003.py", line 59, in <module>
    prob = Problem(obj, obj_grad,
    return self.use_parent_doc(f, overridden)
           ~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^
  File "/home/conda/feedstock_root/build_artifacts/opty_1725960370278/_test_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_p/lib/python3.13/site-packages/opty/direct_collocation.py", line 73, in use_parent_doc
    func.__doc__ = self._combine_docs(self.mthd.__doc__,
                   ~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^
                                      ConstraintCollocator.__init__.__doc__)
                                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/conda/feedstock_root/build_artifacts/opty_1725960370278/_test_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_p/lib/python3.13/site-packages/opty/direct_collocation.py", line 80, in _combine_docs
    _, middle = coll_doc.split('Parameters\n        ==========\n        ')
    ^^^^^^^^^
ValueError: not enough values to unpack (expected 2, got 1)
WARNING: Tests failed for opty-1.3.0-py313h9c9eb82_1.conda - moving package to /home/conda/feedstock_root/build_artifacts/broken
Traceback (most recent call last):
  File "/opt/conda/lib/python3.10/site-packages/conda_build/build.py", line 3523, in test
    utils.check_call_env(
  File "/opt/conda/lib/python3.10/site-packages/conda_build/utils.py", line 404, in check_call_env
    return _func_defaulting_env_to_os_environ("call", *popenargs, **kwargs)
  File "/opt/conda/lib/python3.10/site-packages/conda_build/utils.py", line 380, in _func_defaulting_env_to_os_environ
    raise subprocess.CalledProcessError(proc.returncode, _args)
subprocess.CalledProcessError: Command '['/bin/bash', '-o', 'errexit', '/home/conda/feedstock_root/build_artifacts/opty_1725960370278/test_tmp/conda_test_runner.sh']' returned non-zero exit status 1.

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/opt/conda/bin/conda-build", line 11, in <module>
    sys.exit(execute())
  File "/opt/conda/lib/python3.10/site-packages/conda_build/cli/main_build.py", line 589, in execute
    api.build(
  File "/opt/conda/lib/python3.10/site-packages/conda_build/api.py", line 209, in build
    return build_tree(
  File "/opt/conda/lib/python3.10/site-packages/conda_build/build.py", line 3727, in build_tree
    test(pkg, config=metadata.config.copy(), stats=stats)
  File "/opt/conda/lib/python3.10/site-packages/conda_build/build.py", line 3537, in test
    tests_failed(
  File "/opt/conda/lib/python3.10/site-packages/conda_build/build.py", line 3584, in tests_failed
    raise CondaBuildUserError("TESTS FAILED: " + os.path.basename(pkg))
conda_build.exceptions.CondaBuildUserError: TESTS FAILED: opty-1.3.0-py313h9c9eb82_1.conda

and it seems that this split() call isn't working:

    @staticmethod
    def _combine_docs(prob_doc, coll_doc):
        beg, end = prob_doc.split('bounds')
        _, middle = coll_doc.split('Parameters\n        ==========\n        ')
        return beg + middle[:-9] + '        bounds' + end
@moorepants moorepants added the bug label Sep 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant