Skip to content

Fix python instructions collecting method for python 3.9 and older #2693

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

Merged
merged 2 commits into from
Nov 24, 2023

Conversation

tamarinvs19
Copy link
Collaborator

Description

Used dis.get_instructions() instead of __code__.co_lines() for instruction collecting if python interpreter version is older then 3.10

How to test

Manual tests

  1. Run utbot on python project with python 3.9 (3.8, ...)
  2. Run utbot on python project with python 3.10 (3.11, 3.12)

Self-check list

Check off the item if the statement is true. Hint: [x] is a marked item.

Please do not delete the list or its items.

  • I've set the proper labels for my PR (at least, for category and component).
  • PR title and description are clear and intelligible.
  • I've added enough comments to my code, particularly in hard-to-understand areas.
  • The functionality I've repaired, changed or added is covered with automated tests.
  • Manual tests have been provided optionally.
  • The documentation for the functionality I've been working on is up-to-date.

@tamarinvs19 tamarinvs19 added lang-python Issue is related to python support ctg-bug-fix PR is fixing a bug labels Nov 20, 2023
@tamarinvs19 tamarinvs19 self-assigned this Nov 20, 2023
tochilinak
tochilinak previously approved these changes Nov 21, 2023
Copy link
Member

@tochilinak tochilinak left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Doesn't utbot-python-executor need to update version?

@tochilinak tochilinak dismissed their stale review November 21, 2023 12:27

Took a deeper look

@tamarinvs19 tamarinvs19 merged commit 0bbb527 into main Nov 24, 2023
@tamarinvs19 tamarinvs19 deleted the tamarinvs19/fix-instructions branch November 24, 2023 07:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ctg-bug-fix PR is fixing a bug lang-python Issue is related to python support
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants