Skip to content

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

Merged
tamarinvs19 merged 2 commits into
mainfrom
tamarinvs19/fix-instructions
Nov 24, 2023
Merged

Fix python instructions collecting method for python 3.9 and older#2693
tamarinvs19 merged 2 commits into
mainfrom
tamarinvs19/fix-instructions

Conversation

@tamarinvs19

Copy link
Copy Markdown
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

@tochilinak tochilinak left a comment

Copy link
Copy Markdown
Member

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