Skip to content

Checking for python version for the open_binary and files calls#373

Merged
K0lb3 merged 2 commits into
K0lb3:masterfrom
TedyonGit:patch-2
Jul 9, 2026
Merged

Checking for python version for the open_binary and files calls#373
K0lb3 merged 2 commits into
K0lb3:masterfrom
TedyonGit:patch-2

Conversation

@TedyonGit

Copy link
Copy Markdown
Contributor

I just wanted to fix the warning "DeprecationWarning".
So i just added a check for python version. If the python version is >= 3.9, then is going to use files call.
If not, is going to fallback to open_binary.

Is not much, but i hope it helps :D

@K0lb3

K0lb3 commented Jun 13, 2026

Copy link
Copy Markdown
Owner

Thanks,
and sorry for the late response.

I think that there was a reason I didn't implement this, but I can't recall it anymore.
Maybe I also simply did something wrong at that time, so let's see if the tests pass across different python versions and systems.

Comment thread UnityPy/helpers/Tpk.py Outdated
@K0lb3

K0lb3 commented Jun 13, 2026

Copy link
Copy Markdown
Owner

^ tests failed due to a ruff formatting check

@K0lb3 K0lb3 merged commit 59af5e2 into K0lb3:master Jul 9, 2026
6 checks passed
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.

2 participants