Skip to content

Conversation

@bosd
Copy link
Contributor

@bosd bosd commented Dec 31, 2025

based on unmerged: #3258

@bosd bosd mentioned this pull request Dec 31, 2025
39 tasks
bosd added 2 commits December 31, 2025 15:18
    - Add proper string conversion for non-string return values from Python code
      in sequence evaluation to prevent TypeError during string concatenation
    - Use isinstance check to only convert non-string values, preserving
      original behavior for string results
    - Add test case to verify handling of integer return values from Python code
    - Use separate sequence in test to avoid interference with other tests

   The fix ensures that when Python code in sequence evaluation returns
   non-string values (like integers), they are properly converted to strings
   before concatenation with prefix and suffix, preventing TypeError.

   Fixes potential issue where Python expressions returning integers or
   other non-string types would cause concatenation errors.
@bosd bosd force-pushed the 19-mig-sequence_python branch from 12ddf28 to b9fca8c Compare December 31, 2025 18:48
@bosd
Copy link
Contributor Author

bosd commented Dec 31, 2025

/ocabot migration sequence_python

@OCA-git-bot
Copy link
Contributor

Sorry @bosd you are not allowed to mark the addon to be migrated.

To do so you must either have push permissions on the repository, or be a declared maintainer of all modified addons.

If you wish to adopt an addon and become it's maintainer, open a pull request to add your GitHub login to the maintainers key of its manifest.

bosd added 2 commits December 31, 2025 20:22
 - Move UUID safe members computation to module level as a constant
 - Replace repeated computation in _get_python_eval_context with constant lookup
 - Use _UUID_SAFE_MEMBERS constant instead of computing uuid_elements on each call
 - Improves performance by avoiding redundant computation on every sequence evaluation

 This optimization pre-computes the UUID safe members list once at module
 import time instead of recomputing it on every call to _get_python_eval_context,
which can happen frequently during sequence operations.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

9 participants