Skip to content

Switch to Python3#7

Open
lemenkov wants to merge 2 commits intombuesch:masterfrom
lemenkov:python3
Open

Switch to Python3#7
lemenkov wants to merge 2 commits intombuesch:masterfrom
lemenkov:python3

Conversation

@lemenkov
Copy link
Copy Markdown

Python 2.x no longer supported by upstream. Let's use Python3 explicitly.

lemenkov added 2 commits June 21, 2024 10:27
Signed-off-by: Peter Lemenkov <lemenkov@gmail.com>
Signed-off-by: Peter Lemenkov <lemenkov@gmail.com>
@mbuesch
Copy link
Copy Markdown
Owner

mbuesch commented Jun 21, 2024

Thanks for your contribution.

Did you actually test this, or is this only a simple 2to3 conversion?

@lemenkov
Copy link
Copy Markdown
Author

Only b43-asm was tested (as a build-tool for OpenFWWF firmware). Other tools weren't tested. And yes this was done with 2to3.

/usr/bin/make -O -j12 V=1 VERBOSE=1
b43-asm ucode5.asm ucode5.fw --cpp-args -DDEBUG=1 -- --ivalext .fw --psize
ucode5.fw:  text = 1190 instructions (9520 bytes)
b0g0initvals5.fw:  177 values (968 bytes)
b0g0bsinitvals5.fw:  31 values (150 bytes)
Assembler info:
  Using start address 0

@mbuesch
Copy link
Copy Markdown
Owner

mbuesch commented Jun 22, 2024

Ok. Hm.

Well, porting Python2 to 3 is hard, because every single line of code should be executed at least once to get a reasonable idea of whether it works or not.
I would expect at least a couple of str<->bytes conversions to be required here and there in addition to 2to3.

I would like to rather leave the ancient scripts as-is Python2 than breaking them. For example the debug scripts. Does anybody really use them today? And if so, do they do it on a modern system?

Can we split this PR into seperate PRs? One for fwcutter and one for disassembler? And can we leave the debug scripts as-is?

@lemenkov
Copy link
Copy Markdown
Author

I would like to rather leave the ancient scripts as-is Python2 than breaking them. For example the debug scripts.

Sounds reasonable.

Can we split this PR into seperate PRs? One for fwcutter and one for disassembler? And can we leave the debug scripts as-is?

Sure thing. I'll split it and review it more thoroughly.

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