Skip to content

attr version range #3

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
billcrook opened this issue Jan 15, 2018 · 7 comments · Fixed by #4
Closed

attr version range #3

billcrook opened this issue Jan 15, 2018 · 7 comments · Fixed by #4
Assignees

Comments

@billcrook
Copy link

After pulling kms-encryption-toolbox into my project, I see:

Traceback (most recent call last):
  File "/Users/billcrook/dev/insights-api/venv/bin/py.test", line 7, in <module>
    from pytest import main
  File "/Users/billcrook/dev/insights-api/venv/lib/python3.6/site-packages/pytest.py", line 13, in <module>
    from _pytest.fixtures import fixture, yield_fixture
  File "/Users/billcrook/dev/insights-api/venv/lib/python3.6/site-packages/_pytest/fixtures.py", line 842, in <module>
    class FixtureFunctionMarker(object):
  File "/Users/billcrook/dev/insights-api/venv/lib/python3.6/site-packages/_pytest/fixtures.py", line 844, in FixtureFunctionMarker
    params = attr.ib(convert=attr.converters.optional(tuple))
AttributeError: module 'attr' has no attribute 'converters'
make: *** [test] Error 1

It appears toolbox has a max version of 17 for attr which causes a dependency conflict and override of a transitive dependency. When explicitly setting attr to 17.4.0, everything works fine. You might consider relaxing the dependency range. Cheers!

@lukaszb
Copy link

lukaszb commented Jan 15, 2018

@billcrook Thanks, can you also provide which version of attr you've been using when this error occurred?

@mattsb42-aws
Copy link

Looks like this is a transitive dependency resolution conflict with pytest. In the pytest FixtureFunctionMarker class[1], they use the attr.converters.optional[2], which was introduced in 17.1.0.

As an FYI, aws-encryption-sdk will be bumping the minimum attrs version to 17.4.0 in the next release[3]. Is there a specific reason you capped attrs at 17.0.0?

[1] https://github.com/pytest-dev/pytest/blob/db4df5833a6699345761e1851bfed32eb1109121/_pytest/fixtures.py#L844
[2] https://github.com/python-attrs/attrs/blob/master/src/attr/converters.py#L8
[3] aws/aws-encryption-sdk-python#40

@rogoman rogoman self-assigned this Jan 16, 2018
@rogoman
Copy link
Contributor

rogoman commented Jan 16, 2018

I'll try to look into it this week. Thanks for the tip!

@billcrook
Copy link
Author

@lukaszb 17.4.0

@mattsb42-aws
Copy link

I'm actually not seeing attrs used anywhere in your codebase. Was this dependency block to work around the issues aws-encryption-sdk had with attrs 17.0.0? If so, we fixed that in 1.3.0 (and isolated the attrs dependency ourselves in 1.2.2).

https://github.com/awslabs/aws-encryption-sdk-python/blob/master/CHANGELOG.rst#122
https://github.com/awslabs/aws-encryption-sdk-python/blob/master/CHANGELOG.rst#130

@rogoman
Copy link
Contributor

rogoman commented Jan 22, 2018

@mattsb42-aws yes, exactly that. We removed the direct dependency and published a new version: https://pypi.python.org/pypi/kms-encryption-toolbox/0.1.0

@mattsb42-aws
Copy link

Great! If you ever run into something like that again before we notice it, please let us know with an issue in our repo and we'll make sure it is addressed asap (PRs are also welcome).

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.

4 participants