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

liberty tests fail with python 3.11 #422

Open
proppy opened this issue Jun 2, 2023 · 0 comments · May be fixed by #423
Open

liberty tests fail with python 3.11 #422

proppy opened this issue Jun 2, 2023 · 0 comments · May be fixed by #423

Comments

@proppy
Copy link
Member

proppy commented Jun 2, 2023

Expected Behavior

liberty tests pass

Actual Behavior

liberty tests fail with the following error:

**********************************************************************
File "$SRC_DIR/skywater-pdk/scripts/python-skywater-pdk/skywater_pdk/liberty.py", line 68, in __main__.TimingType
Failed example:
    (TimingType.leakage | TimingType.ccsnoise).names()
Expected:
    'basic, ccsnoise, leakage'
Got:
    'basic, leakage'
**********************************************************************
File "$SRC_DIR/skywater-pdk/scripts/python-skywater-pdk/skywater_pdk/liberty.py", line 71, in __main__.TimingType
Failed example:
    TimingType.ccsnoise.names()
Expected:
    'basic, ccsnoise'
Got:
    'basic'
**********************************************************************
1 items had failures:
   2 of  10 in __main__.TimingType
***Test Failed*** 2 failures.

Steps to Reproduce the Problem

  1. python3.11 -m skywater_pdk.liberty -v

Specifications

  • Version: HEAD
  • Platform: python 3.11

This is due as a behavioral change in python 3.11 for Flag/IntFlag iteration, see python/cpython#99304.

Now Python 3.11 only returns canonical flags during iteration as documented here:
https://docs.python.org/3/howto/enum.html#flag-and-intflag-minutia:~:text=only%20canonical%20flags%20are%20returned%20during%20iteration%3A

__members__ needs to be used to also get aliases.

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 a pull request may close this issue.

1 participant