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

tests/testpython.py: Covert to Python 3 #609

Closed
wants to merge 1 commit into from

Conversation

@travier
Copy link
Author

travier commented Jul 2, 2024

Untested.

@@ -1,4 +1,4 @@
#!/usr/bin/python2
#!/usr/bin/python

import importme
print importme.foo
Copy link

Choose a reason for hiding this comment

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

This is Python 2 syntax.

@travier travier changed the title tests/testpython.py: Do not hardcode Python 2 tests/testpython.py: Covert to Python 3 Jul 2, 2024
@hroncok
Copy link

hroncok commented Jul 2, 2024

I've read 9c57a57 and porting this file to Python 3 makes very little sense to me. I belive this file is deliberately Python 2.

@hroncok
Copy link

hroncok commented Jul 2, 2024

To clarify: The purpose of the test seems to be a script with python2 shebang.

If you change the shebang (and port the script to python 3), the purpose of the test is defeated.

The test is skipped when python2 is not available. To fix https://bugzilla.redhat.com/show_bug.cgi?id=2249819 IMHO the Fedora package should filter the automatic dependency out instead.

@debarshiray
Copy link
Contributor

To clarify: The purpose of the test seems to be a script with python2 shebang.

If you change the shebang (and port the script to python 3), the purpose of the test is defeated.

Thanks for digging into the code. I never got around to digging into what commit 9c57a57 and commit 006d9a1 were actually trying to accomplish, which was made worse by my almost non-existent knowledge of Python these days. So, thanks for doing that.

The test is skipped when python2 is not available. To fix https://bugzilla.redhat.com/show_bug.cgi?id=2249819 IMHO the Fedora package should filter the automatic dependency out instead.

Okay!

Copy link
Contributor

@debarshiray debarshiray left a comment

Choose a reason for hiding this comment

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

If this commit is really needed, then there's a minor typo in the commit message. It should be convert, not covert. :)

@TingPing
Copy link
Member

TingPing commented Jul 3, 2024

I'll close this since it is a python2 specific test. Someday it can just be removed entirely but it costs nothing to leave it there, and python2 can and will still be used in flatpak for a least a bit.

@TingPing TingPing closed this Jul 3, 2024
@travier travier deleted the main-no-python2 branch July 4, 2024 12:06
@travier
Copy link
Author

travier commented Jul 4, 2024

👍🏻 Thanks for digging!

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.

4 participants