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

Python 3.6 compatibility fixes #1294

Merged
merged 3 commits into from
Apr 26, 2023
Merged

Python 3.6 compatibility fixes #1294

merged 3 commits into from
Apr 26, 2023

Conversation

thozza
Copy link
Member

@thozza thozza commented Apr 25, 2023

  • README: update required Python version to 3.6
  • Don't use directory argument with SimpleHTTPRequestHandler constructor
  • Don't use capture_output=True with subprocess.run()

#1262 adds testing on Python 3.6

The `capture_output` argument does not exist on Python 3.6 used by
default on RHEL-8.

Signed-off-by: Tomáš Hozza <thozza@redhat.com>
@supakeen
Copy link
Member

Ack, but the README needs to be updated separately if we run on 3.6.

supakeen
supakeen previously approved these changes Apr 25, 2023
supakeen
supakeen previously approved these changes Apr 25, 2023
@supakeen
Copy link
Member

Thank you :)

@thozza thozza enabled auto-merge (rebase) April 25, 2023 10:34
achilleas-k
achilleas-k previously approved these changes Apr 25, 2023
@thozza
Copy link
Member Author

thozza commented Apr 25, 2023

I found more py36 related stuff, so will back off with this PR and add those... Sorry for the noise...

@thozza thozza marked this pull request as draft April 25, 2023 13:02
auto-merge was automatically disabled April 25, 2023 13:02

Pull request was converted to draft

The `directory` argument has been added only since Python 3.7, which
breaks the unit test on Python 3.6.

Reimplement the intended behavior by overriding the `translate_path()`
method, which takes the `directory` value into account on newer Python
versions.

Signed-off-by: Tomáš Hozza <thozza@redhat.com>
Signed-off-by: Tomáš Hozza <thozza@redhat.com>
@thozza thozza dismissed stale reviews from achilleas-k and supakeen via dd8ef92 April 25, 2023 14:18
@thozza thozza changed the title Py36 compatibility: don't use capture_output=True with subprocess.run() Python 3.6 compatibility fixes Apr 25, 2023
@thozza thozza marked this pull request as ready for review April 25, 2023 14:35
@thozza thozza enabled auto-merge (rebase) April 25, 2023 14:35
Copy link
Contributor

@lavocatt lavocatt left a comment

Choose a reason for hiding this comment

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

Lgtm!

@thozza thozza merged commit 33f3adf into osbuild:main Apr 26, 2023
39 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.

None yet

4 participants