Skip to content
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

Remove MarkInfo #4564

Merged
merged 7 commits into from Dec 21, 2018
Merged

Conversation

RonnyPfannschmidt
Copy link
Member

@RonnyPfannschmidt RonnyPfannschmidt commented Dec 19, 2018

this removes marker info in various ways

a) no more legacy marker objects on functions (this has surprising effects)
b) keywords are changes in a backward incompatible way as markerinfo goes away
c) plugin hook parsing needs an additional compatibility hack, i registered #4562
d) mark finding got a bit tighter to sort out mistakes in prior normalization
e) gruesome bugs in parameterize and fixture handling have been resolved by switching from attributes to definition markers

fixes #3515
fixes #3537 (removes legacy marker transfer which triggers the error)
fixes #891
fixes #4546

@RonnyPfannschmidt RonnyPfannschmidt changed the base branch from master to features December 19, 2018 15:05
Copy link
Member

@nicoddemus nicoddemus left a comment

Choose a reason for hiding this comment

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

Thanks @RonnyPfannschmidt, this looked painful! 👍

Please update deprecations.rst and add a CHANGELOG entry following the format used by the other removal entries.

src/_pytest/fixtures.py Show resolved Hide resolved
testing/test_mark.py Show resolved Hide resolved
@codecov
Copy link

codecov bot commented Dec 19, 2018

Codecov Report

Merging #4564 into features will increase coverage by 0.02%.
The diff coverage is 100%.

Impacted file tree graph

@@             Coverage Diff              @@
##           features    #4564      +/-   ##
============================================
+ Coverage     95.71%   95.73%   +0.02%     
============================================
  Files           111      111              
  Lines         24863    24663     -200     
  Branches       2449     2442       -7     
============================================
- Hits          23797    23612     -185     
+ Misses          751      740      -11     
+ Partials        315      311       -4
Flag Coverage Δ
#docs 29.59% <37.03%> (+0.26%) ⬆️
#doctesting 29.59% <37.03%> (+0.26%) ⬆️
#linting 29.59% <37.03%> (+0.26%) ⬆️
#linux 95.56% <100%> (+0.02%) ⬆️
#nobyte 92.36% <100%> (-0.03%) ⬇️
#numpy 93.19% <96.29%> (+0.01%) ⬆️
#pexpect 42.12% <40.74%> (+0.24%) ⬆️
#py27 93.77% <100%> (+0.01%) ⬆️
#py34 91.86% <100%> (+0.03%) ⬆️
#py35 91.88% <100%> (+0.03%) ⬆️
#py36 91.9% <100%> (+0.03%) ⬆️
#py37 93.92% <100%> (+0.01%) ⬆️
#trial 93.19% <96.29%> (+0.01%) ⬆️
#windows 93.92% <100%> (-0.01%) ⬇️
#xdist 93.77% <100%> (-0.01%) ⬇️
Impacted Files Coverage Δ
src/_pytest/unittest.py 94.28% <ø> (-0.13%) ⬇️
src/_pytest/nodes.py 95.52% <ø> (-0.11%) ⬇️
src/_pytest/config/__init__.py 93.67% <100%> (+0.02%) ⬆️
src/_pytest/fixtures.py 97.91% <100%> (-0.01%) ⬇️
testing/test_mark.py 99.05% <100%> (+1.86%) ⬆️
src/_pytest/python.py 93% <100%> (-0.01%) ⬇️
src/_pytest/mark/structures.py 92.61% <100%> (-1.43%) ⬇️
src/_pytest/mark/__init__.py 97.56% <100%> (-0.06%) ⬇️
src/_pytest/terminal.py 91.7% <0%> (+0.84%) ⬆️

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 58fc918...134641f. Read the comment docs.

Copy link
Member

@nicoddemus nicoddemus left a comment

Choose a reason for hiding this comment

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

Please also update deprecations.rst and add a CHANGELOG entry. 👍

src/_pytest/config/__init__.py Show resolved Hide resolved
src/_pytest/config/__init__.py Show resolved Hide resolved
src/_pytest/config/__init__.py Show resolved Hide resolved
src/_pytest/python.py Show resolved Hide resolved
src/_pytest/python.py Show resolved Hide resolved
@nicoddemus
Copy link
Member

Rebasing/merging on the latest features will fix the failing test in py35

src/_pytest/config/__init__.py Show resolved Hide resolved
doc/en/deprecations.rst Outdated Show resolved Hide resolved
doc/en/deprecations.rst Outdated Show resolved Hide resolved
doc/en/deprecations.rst Outdated Show resolved Hide resolved
@RonnyPfannschmidt
Copy link
Member Author

now comes the task of actually collecting all the different issues with the removals and correctly reffering them ^^

@nicoddemus
Copy link
Member

now comes the task of actually collecting all the different issues with the removals and correctly reffering them ^^

You mean for the CHANGELOG? hehehe yeah, after that this is good to merge. 👍

doc/en/deprecations.rst Outdated Show resolved Hide resolved
@RonnyPfannschmidt RonnyPfannschmidt added this to the 4.1 milestone Dec 21, 2018
@RonnyPfannschmidt RonnyPfannschmidt changed the title WIP: Remove markinfo Remove MarkInfo Dec 21, 2018
@nicoddemus
Copy link
Member

Hehehe I was just solving the conflicts myself. 😁

@RonnyPfannschmidt
Copy link
Member Author

i found that kdiff3 is epic-ally better than github at resolving them (my rebase needed no work at all)

@nicoddemus nicoddemus merged commit 134ace9 into pytest-dev:features Dec 21, 2018
@RonnyPfannschmidt RonnyPfannschmidt deleted the remove-markinfo branch December 21, 2018 16:42
@RonnyPfannschmidt
Copy link
Member Author

💥

@nicoddemus
Copy link
Member

We are ready to release 4.1; as @RonnyPfannschmidt mentioned, let's do it after the holidays. 👍

kaiwalyajoshi added a commit to mesosphere/dcos-commons that referenced this pull request Jan 16, 2019
…d upstream as mentioned here: pytest-dev/pytest#4606 (comment)

Quoted here incase that link breaks in the future:
        "We have removed item.get_marker, users should use item.get_closest_marker now
        (it's a long history, this was not an arbitrary change). Indeed I suspect
        pytest-cov might need to be updated."

item.get_marker was removed in this PR pytest-dev/pytest#4564
kaiwalyajoshi added a commit to mesosphere/dcos-commons that referenced this pull request Feb 21, 2019
…d upstream as mentioned here: pytest-dev/pytest#4606 (comment)

Quoted here incase that link breaks in the future:
        "We have removed item.get_marker, users should use item.get_closest_marker now
        (it's a long history, this was not an arbitrary change). Indeed I suspect
        pytest-cov might need to be updated."

item.get_marker was removed in this PR pytest-dev/pytest#4564
kaiwalyajoshi added a commit to mesosphere/dcos-commons that referenced this pull request Feb 22, 2019
* Replace item.get_marker with item.get_closest_marker as it was removed upstream as mentioned here: pytest-dev/pytest#4606 (comment)

Quoted here incase that link breaks in the future:
        "We have removed item.get_marker, users should use item.get_closest_marker now
        (it's a long history, this was not an arbitrary change). Indeed I suspect
        pytest-cov might need to be updated."

item.get_marker was removed in this PR pytest-dev/pytest#4564

* Determine security mode of the cluster by querying the cluster instead of a local environment-variable.

* Remove underscores from services names, this breaks for scenarios such as 'nonessential_tasks' where underscores are not allowed in task names.

* Update frameworks/helloworld/tests/scale/test_scale.py

Co-Authored-By: kaiwalyajoshi <kjoshi@mesosphere.com>

* Address comments from code-review

* Add support for soack configuration and custom service names, this can be used to differentiate the various hello-worlds. ie --service-name='orchestration/hello-world'
hroncok added a commit to hroncok/pip that referenced this pull request Apr 4, 2019
xavfernandez pushed a commit to pypa/pip that referenced this pull request Apr 4, 2019
gtristan pushed a commit to buildstream-migration/buildstream that referenced this pull request Oct 9, 2020
Starting from `pytest` version 4.1.0, `Node.get_marker()` has been
removed, and hence our tests break when running with newer versions of
`pytest`. It was deprecated since a while back but it has recently been
removed completely. Use `get_closest_marker()` as a replacement that is
suggested in the changelog, and seems to work fine for our use case.

See pytest-dev/pytest#4564 for more context on
the upstream issue.

One way of verifying this change is that this should fix the recently
added `tests-fedora-update-deps` job, that was failing before due to
this issue.

(cherry picked from commit c91784a)
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.

None yet

2 participants