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

emboss fails to run on python 3.8 #136

Closed
EricRahm opened this issue Apr 18, 2024 · 1 comment · May be fixed by #137
Closed

emboss fails to run on python 3.8 #136

EricRahm opened this issue Apr 18, 2024 · 1 comment · May be fixed by #137
Labels
bug Something isn't working

Comments

@EricRahm
Copy link
Collaborator

EricRahm commented Apr 18, 2024

Running emboss is currently broken in python version 3.8. I believe our code now relies on at least 3.9 as of PR #111. We could try to add back 3.8 support but given it's EOL in a few months and #111 seems to be fixing a real issue I'd suggest just bumping the min version to 3.9.

STR:

  1. Verify the a new default python3 works
# run with local installation
$ python3 --version
Python 3.11.8
$ bazel test \
    'compiler/back_end/cpp:*' \
    'compiler/front_end:*' 'compiler/util:*' 'integration/googletest:*'

<snip>

Executed 80 out of 80 tests: 80 tests pass.
//integration/googletest:emboss_test_util_test                           PASSED in 0.2s

Executed 80 out of 80 tests: 80 tests pass.
  1. Explicitly run against python 3.8
$ pyenv install 3.8
$ bazel test --action_env=PYENV_VERSION=3.8 \
    'compiler/back_end/cpp:*' 'compiler/front_end:*' \
    'compiler/util:*' 'integration/googletest:*'

<snip>

//compiler/front_end:write_inference_test                                FAILED in 2.7s
  /usr/local/google/home/erahm/.cache/bazel/_bazel_erahm/ce8d987ff54be8a48c8957a8dbac668b/execroot/com_google_emboss/bazel-out/k8-fastbuild/testlogs/compiler/front_end/write_inference_test/test.log

Executed 80 out of 80 tests: 66 tests pass and 14 fail locally.

$ cat /usr/local/google/home/erahm/.cache/bazel/_bazel_erahm/ce8d987ff54be8a48c8957a8dbac668b/execroot/com_google_emboss/bazel-out/k8-fastbuild/testlogs/compiler/front_end/write_inference_test/test.log
exec ${PAGER:-/usr/bin/less} "$0" || exit 1
Executing tests from //compiler/front_end:write_inference_test
-----------------------------------------------------------------------------
EEEEEEEEEEEEEE
======================================================================
ERROR: test_adds_alias_write_method_to_alias_of_alias_of_physical_field (__main__.WriteInferenceTest)
----------------------------------------------------------------------

<snip>

  File "/tmp/bazel-working-directory/com_google_emboss/bazel-out/k8-fastbuild/bin/compiler/front_end/write_inference_test.runfiles/com_google_emboss/compiler/util/resources.py", line 21, in load
    with importlib.resources.files(
AttributeError: module 'importlib.resources' has no attribute 'files'
  1. Explicitly run against 3.9, note things work again
$ pyenv install 3.9
$ bazel test --action_env=PYENV_VERSION=3.9 \
    'compiler/back_end/cpp:*' 'compiler/front_end:*' \
    'compiler/util:*' 'integration/googletest:*'
<snip>
//integration/googletest:emboss_test_util_test                           PASSED in 0.0s

Executed 80 out of 80 tests: 80 tests pass.
EricRahm added a commit to EricRahm/emboss that referenced this issue Apr 18, 2024
This bumps the required version to 3.9 which is what our codebase
currently requires. It also adds a bazel rule to install a hermetic
python 3.9 package. This will make `bazel` always use the hermetic
package which should avoid backwards compatibility issues in the
future.

Fixes google#136
@jasongraffius jasongraffius added the bug Something isn't working label Jul 22, 2024
@reventlov
Copy link
Collaborator

Now obsolete, as Python 3.8 is EOL.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants