Skip to content

Run away from getfuncargvalue deprecation. #64

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

Merged
merged 4 commits into from
May 26, 2017
Merged

Conversation

amateja
Copy link
Contributor

@amateja amateja commented May 23, 2017

Howdy!

Here you have a patch for deprecated getfuncargvalue method. This PR is based on pytest-dev/pytest-django#393.

Cheers!

@amateja
Copy link
Contributor Author

amateja commented May 23, 2017

I know... tests are failing but it's due to version conflicts which is out of scope of this PR. Should fix for it be included too or you prefer separate PR?

@nicoddemus
Copy link
Member

Thanks @amateja for the PR.

I'm not sure what pytest version is supposed to be supported by pytest-flask, but if it is >= 3.0 request.getfixturevalue can be used directly instead.

if hasattr(request, 'getfixturevalue'):
return request.getfixturevalue(value)

return request(value)
Copy link
Member

Choose a reason for hiding this comment

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

Shouldn't this be return request.getfuncargvalue(value)?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Nice catch! By accident I overwritten that line in 8aba5e0 before committing my changes and didn't fix it properly in 0c92db3. Sorry.

@nicoddemus
Copy link
Member

About if it is OK to fix the build on this PR or in another one, the maintainers must decide. 😁

@amateja
Copy link
Contributor Author

amateja commented May 23, 2017

I'm not sure if this is fixable easily. Some package in dependency chain requires pytest>=2.7.0 and we are testing against 2.6.x. We have two options - drop testing against 2.6.x (which is not an direct equivalent of dropping support) or track down that dependency and pin its version in tox deps matrix.

@amateja
Copy link
Contributor Author

amateja commented May 23, 2017

Found it! It is because of recent changes in pytest-xdist. Will try to propose a workaround.

@nicoddemus
Copy link
Member

IMHO dropping support for pytest < 2.7.0 is reasonable, 2.6.4 was released in Oct 24, 2014.

@amateja
Copy link
Contributor Author

amateja commented May 24, 2017

Actually dropping support for pytest 2.6.x might be reasonable. According to pytest changelog python 3.5+ is supported only by pytest 2.7.3+. Keeping in mind that python 2.6 is deprecated and 3.3 is going to be deprecated this year dependency matrix is going to be not that beautiful. Moreover pytest 3.1 was released couple days ago so we might add it to test suite.

@vitalk
Copy link
Collaborator

vitalk commented May 26, 2017

Hi, @amateja!

Thank you so much for your contribution!

@vitalk vitalk merged commit 3cb5d00 into pytest-dev:master May 26, 2017
@remcohaszing
Copy link

@nicoddemus Could you release this on pypi?

@vitalk
Copy link
Collaborator

vitalk commented May 31, 2017

@remcohaszing I publish a new release on this weekend. Thank you for patience.

@yunliaw
Copy link

yunliaw commented Apr 9, 2018

@vitalk I found that on pypi the latest version published is 0.10.0, which seems to be not the one with this MR. Could you help to make a new release? Thanks!

@nicoddemus
Copy link
Member

@vitalk could you also add me as maintainer in PyPI? Thanks!

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.

5 participants