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

Instances of baseCenum is not treated as int by ctypes in python3.11 #46

Closed
larsevj opened this issue Jan 19, 2024 · 0 comments · Fixed by #47
Closed

Instances of baseCenum is not treated as int by ctypes in python3.11 #46

larsevj opened this issue Jan 19, 2024 · 0 comments · Fixed by #47
Assignees

Comments

@larsevj
Copy link
Collaborator

larsevj commented Jan 19, 2024

Describe the bug
When prototype.call is used on a function expecting an int and you give it an instance of basecenum it will give you a ValueError in python3.11, due to stricter type enforcements.

To Reproduce
Run resdata tests onprem, or run this script:

from cwrap import BaseCEnum
from resdata.resfile import ResdataFile
from resdata import FileMode
  
f1 = ResdataFile("some_file.some", index_filename="index")

will faile with TypeError on python3.11 while it fails on file not found for python3.8.

@andreas-el andreas-el added this to SCOUT Jan 25, 2024
@andreas-el andreas-el moved this to Ready for Review in SCOUT Jan 25, 2024
@andreas-el andreas-el moved this from Ready for Review to In Review in SCOUT Jan 25, 2024
@github-project-automation github-project-automation bot moved this from In Review to Done in SCOUT Jan 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

1 participant