-
-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
pytest triggering deprecation warnings in 3.0.5 #2118
Comments
this may prove tricky, it happens in parse_factories |
Couldn't you put a "with warnings.catch_warnings():" around line 1071? https://docs.python.org/3/library/warnings.html#temporarily-suppressing-warnings |
i'd rather investigate why we run into those objects, and whether we can avoid the situation to begin with (as we could be hiding other deprecations as well) |
A quick test in my tox virtualenv seems to show that the context manager doesn't prevent the warnings..? BTW, I run my test suite with:
So I try to see warnings, but that last line is to suppress a warning that pytest-xdist causes. |
Oops, I hadn't tried catch_warnings correctly. This works, and should only silence this specific warning:
|
@nedbat if i recall correctly that operation will reset the once filter cache of the warnings module in various python version |
@nedbat the real bug is, that it tries to operate on a Node object as test object |
@nicoddemus @nedbat the problem lies in i will fix this one |
After @RonnyPfannschmidt fixes it, should we do a |
@The-Compiler you should never error on pending ones tho ^^ |
I just blacklisted 3.0.5, so no hurry from my side. @RonnyPfannschmidt I'll have to disagree - if pytest failed on PendingDeprecationWarnings in its testsuite, I'm pretty we'd have noticed that it's issuing them during normal operation. And in my own testsuite, IMHO it's good to know about deprecated stuff as early as possible 😉 |
@The-Compiler pendingdeprecations are really silent by default also while investigating we added pending deprecation in a really bad way |
Your PR still does |
i still do the pending ones for the old usage site, i changed the other usage side that uses a old api to log the deprecation |
Wish I'd known about this error before I upgraded pytest to 3.0.5. I don't think that 3.0.5 should be available without this issue resolved. I guess I'm going to figure out how to downgrade my pytest install. |
I haven't really had time for much pytest work recently, and just happened to rediscover today that I blacklisted pytest 3.0.5 for qutebrowser 😆 Judging from the commits referencing this issue, others did the same - so I think this should really be fixed for a 3.0.6. |
i have a related pr in the work, it will be fixed by |
I agree with @nicoddemus (this comment and the following ones) that we should rather revert patch-level deprecations and deprecate things properly for the next feature release. |
@The-Compiler the triggering deprecation will be removed, there is an original deprecation that simply doesnt cause warnings that i want to ressurrect at the same time |
IMHO just moving the deprecation that was introduced to the |
As commented by @nedbat in https://bitbucket.org/ned/coveragepy/pull-requests/94, it seems pytest itself is making use of the deprecated
compatproperty
names:cc @nmundar
The text was updated successfully, but these errors were encountered: