Skip to content

Use request.config instead of pytest.config #677

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 1 commit into from
Dec 10, 2018

Conversation

blueyed
Copy link
Contributor

@blueyed blueyed commented Dec 10, 2018

Will be deprecated in pytest 4.1.
Ref: pytest-dev/pytest@b88c3f8f828

@codecov-io
Copy link

codecov-io commented Dec 10, 2018

Codecov Report

Merging #677 into master will not change coverage.
The diff coverage is 100%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master     #677   +/-   ##
=======================================
  Coverage   94.43%   94.43%           
=======================================
  Files          33       33           
  Lines        1852     1852           
  Branches      158      158           
=======================================
  Hits         1749     1749           
  Misses         78       78           
  Partials       25       25
Flag Coverage Δ
#dj110 86.33% <100%> (ø) ⬆️
#dj111 88.71% <100%> (ø) ⬆️
#dj18 87.31% <100%> (ø) ⬆️
#dj19 86.12% <100%> (ø) ⬆️
#dj20 86.6% <100%> (ø) ⬆️
#dj21 82.66% <100%> (ø) ⬆️
#djmaster 82.66% <100%> (ø) ⬆️
#mysql_innodb 86.82% <100%> (ø) ⬆️
#mysql_myisam 86.66% <100%> (ø) ⬆️
#postgres 89.95% <100%> (ø) ⬆️
#py27 91.63% <100%> (ø) ⬆️
#py34 86.12% <100%> (ø) ⬆️
#py35 86.33% <100%> (ø) ⬆️
#py36 87.52% <100%> (ø) ⬆️
#py37 82.66% <100%> (ø) ⬆️
#sqlite 88.66% <100%> (ø) ⬆️
#sqlite_file 86.12% <100%> (ø) ⬆️
Impacted Files Coverage Δ
pytest_django/fixtures.py 97.31% <100%> (ø) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update a3dc56d...c997bef. Read the comment docs.

@blueyed blueyed merged commit 82de481 into pytest-dev:master Dec 10, 2018
@blueyed blueyed deleted the fix-deprecationwarning branch December 10, 2018 08:56
@ransford
Copy link

ransford commented Jan 7, 2019

Does this merit a pytest-django version bump?

I just added --disable-pytest-warnings to a project because the combination of pytest 4.1.0 + pytest-django 3.4.4 was making my tests fail like this:

_____________________ ERROR at setup of test_my_thing _____________________
E   _pytest.warning_types.PytestDeprecationWarning: the `pytest.config` global is deprecated.  Please use `request.config` or `pytest_configure` (if you're a pytest plugin) instead.

A traceback led to two occurrences of pytest.config in pytest_django/fixtures.py.

@PiDelport
Copy link

Does this merit a pytest-django version bump?

Yes please! 🙏

@blueyed
Copy link
Contributor Author

blueyed commented Jan 7, 2019

PytestDeprecationWarning

Why is this an error?
Are you using --strict or something like that?
It should only show up in "warnings summary" normally.

While a new release makes sense I'd like to understand what happens here.

@nicoddemus
Copy link
Member

Probably they have setup the warnings filter to error.

@blueyed
Copy link
Contributor Author

blueyed commented Jan 7, 2019

@ransford @pjdelport
?

@ransford
Copy link

ransford commented Jan 7, 2019

Yes, sorry I forgot to mention that. I had error in the filterwarnings stanza of pytest.ini (on purpose).

@blueyed
Copy link
Contributor Author

blueyed commented Jan 7, 2019

Thanks for the feedback, tagged a new release. Will take a short while until it appears on PyPI.
https://travis-ci.org/pytest-dev/pytest-django/builds/476522277

@ransford
Copy link

ransford commented Jan 7, 2019

Thanks @blueyed (for the new release and your work on this project)!

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