Skip to content

AppVeyor pre-3.5 tests are failing #159

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

Closed
mattsb42-aws opened this issue Jun 6, 2019 · 6 comments
Closed

AppVeyor pre-3.5 tests are failing #159

mattsb42-aws opened this issue Jun 6, 2019 · 6 comments

Comments

@mattsb42-aws
Copy link
Member

Figure out why

ex:

https://ci.appveyor.com/project/mattsb42-aws/aws-encryption-sdk-python-qvyet/builds/25075033

@caitlin-tibbetts
Copy link
Contributor

I'll look into this.

@mattsb42-aws
Copy link
Member Author

Update: looks like now all pre-3.5 versions are failing, now for possibly different reasons... :(

ex:
https://ci.appveyor.com/project/mattsb42-aws/aws-encryption-sdk-python-qvyet/builds/26119032

@mattsb42-aws mattsb42-aws changed the title AppVeyor CPython34-x64 tests are failing AppVeyor pre-3.5 tests are failing Jul 22, 2019
@caitlin-tibbetts
Copy link
Contributor

caitlin-tibbetts commented Jul 22, 2019

For Python34, the issue seems to be that the version of the module ast in the Python library that AppVeyor is running to test Python34 does not include the attribute MatMult. This is confirmed in the docs for the version of ast run in 3.4.

Traceback (most recent call last):
  File "c:\python34-x64\Lib\runpy.py", line 170, in _run_module_as_main
    "__main__", mod_spec)
  File "c:\python34-x64\Lib\runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "C:\projects\aws-encryption-sdk-python-qvyet\.tox\py34-examples\Scripts\pytest.EXE\__main__.py", line 5, in <module>
  File "c:\projects\aws-encryption-sdk-python-qvyet\.tox\py34-examples\lib\site-packages\pytest.py", line 6, in <module>
    from _pytest.assertion import register_assert_rewrite
  File "c:\projects\aws-encryption-sdk-python-qvyet\.tox\py34-examples\lib\site-packages\_pytest\assertion\__init__.py", line 6, in <module>
    from _pytest.assertion import rewrite
  File "c:\projects\aws-encryption-sdk-python-qvyet\.tox\py34-examples\lib\site-packages\_pytest\assertion\rewrite.py", line 443, in <module>
    ast.MatMult: "@",
AttributeError: 'module' object has no attribute 'MatMult'

@caitlin-tibbetts
Copy link
Contributor

caitlin-tibbetts commented Jul 23, 2019

The offending code is in c:\projects\aws-encryption-sdk-python-qvyet\.tox\py34-examples\lib\site-packages\_pytest\assertion\rewrite.py

# Python 3.5+ compatibility
try:
    binop_map[ast.MatMult] = "@"
except AttributeError:
    pass

Which does not seem to run because an AttributeError was still raised.

A way to fix this would be to wrap the block in an if-block that makes sure that MatMult exists in ast, but this file is generated in the .tox folder, so it cannot be changed at this stage.

if hasattr(ast, "MatMult"):

@acioc
Copy link

acioc commented Dec 5, 2020

Closed stale PR for this issue

@farleyb-amazon
Copy link
Contributor

CI has been fixed, plus we no longer support <3.5. Resolving.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants