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

Fix TerminalRepr instances to be hashable #6988

Merged
merged 1 commit into from Apr 2, 2020

Conversation

blueyed
Copy link
Contributor

@blueyed blueyed commented Mar 30, 2020

pytest-xdist assumes ExceptionChainRepr is hashable.

Fixes #6925.
Fixes pytest-dev/pytest-xdist#515.

blueyed added a commit to blueyed/pytest-xdist that referenced this pull request Mar 30, 2020
Reproduces:

    INTERNALERROR> TypeError: unhashable type: 'ExceptionChainRepr'

Ref: pytest-dev#515
Ref: pytest-dev/pytest#6988
blueyed added a commit to blueyed/pytest-xdist that referenced this pull request Mar 30, 2020
Reproduces:

    INTERNALERROR> TypeError: unhashable type: 'ExceptionChainRepr'

Ref: pytest-dev#515
Ref: pytest-dev/pytest#6988
Copy link
Member

@bluetech bluetech left a comment

Choose a reason for hiding this comment

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

Would have been nice to set frozen=True and use value-based equality/hashing, but I guess that's impractical (or even undesirable?)? So LGTM.

@bluetech
Copy link
Member

Hmm but again I see this is targeted at 5.4.x. The flow I (think) we agreed on is to always target master, and backport to the MAJOR.MINOR.x branch.

@blueyed
Copy link
Contributor Author

blueyed commented Apr 2, 2020

I would find it easier to just merge 5.4.x into master, instead of cherry-picking things to the release branch. I've looked quickly for docs, found nothing and thought this would be easier.

@blueyed blueyed changed the base branch from 5.4.x to master April 2, 2020 09:57
@bluetech
Copy link
Member

bluetech commented Apr 2, 2020

I would find it easier to just merge 5.4.x into master, instead of cherry-picking things to the release branch. I've looked quickly for docs, found nothing and thought this would be easier.

Yes we should document it somewhere, but the idea is that all new development is done on master and then backported as needed, without merging branches.

@nicoddemus
Copy link
Member

Yes we should document it somewhere, but the idea is that all new development is done on master and then backported as needed, without merging branches.

Indeed, I understand that the main aspect of the change was for contributors to always target master, instead of having to decide on which branch to target when opening a PR.

pytest-xdist assumes `ExceptionChainRepr` is hashable.

Fixes pytest-dev#6925.
Fixes pytest-dev/pytest-xdist#515.
@blueyed
Copy link
Contributor Author

blueyed commented Apr 2, 2020

Sure, I'm not saying they need to decide and that we should not do "backports" in general.
But if you are knowing that it is going to be backported it could go there directly in theory. Avoids the overhead of "needs backport" labeling and PRs for the backports.
Not going to argue over it though - JFI.

@blueyed blueyed merged commit 20f6331 into pytest-dev:master Apr 2, 2020
@blueyed blueyed deleted the fix-ExceptionChainRepr branch April 2, 2020 22:56
blueyed added a commit to blueyed/pytest that referenced this pull request Apr 2, 2020
pytest-xdist assumes `ExceptionChainRepr` is hashable.

Fixes pytest-dev#6925.
Fixes pytest-dev/pytest-xdist#515.

(cherry picked from commit 20f6331)
blueyed added a commit to blueyed/pytest-xdist that referenced this pull request Apr 2, 2020
Reproduces:

    INTERNALERROR> TypeError: unhashable type: 'ExceptionChainRepr'

Ref: pytest-dev#515
Ref: pytest-dev/pytest#6988
blueyed added a commit to blueyed/pytest-xdist that referenced this pull request Apr 2, 2020
Reproduces:

    INTERNALERROR> TypeError: unhashable type: 'ExceptionChainRepr'

Ref: pytest-dev#515
Ref: pytest-dev/pytest#6988
blueyed added a commit that referenced this pull request Apr 3, 2020
pytest-xdist assumes `ExceptionChainRepr` is hashable.

Fixes #6925.
Fixes pytest-dev/pytest-xdist#515.

(cherry picked from commit 20f6331)
blueyed added a commit to blueyed/pytest that referenced this pull request Nov 8, 2020
pytest-xdist assumes `ExceptionChainRepr` is hashable.

Fixes pytest-dev#6925.
Fixes pytest-dev/pytest-xdist#515.

(cherry picked from commit 20f6331)

pytest-dev#6988

Conflicts:
	src/_pytest/_code/code.py
	testing/code/test_code.py
blueyed added a commit to blueyed/pytest-xdist that referenced this pull request Dec 11, 2020
Reproduces:

    INTERNALERROR> TypeError: unhashable type: 'ExceptionChainRepr'

Ref: pytest-dev#515
Ref: pytest-dev/pytest#6988
nicoddemus pushed a commit to blueyed/pytest-xdist that referenced this pull request Sep 6, 2022
Reproduces:

    INTERNALERROR> TypeError: unhashable type: 'ExceptionChainRepr'

Ref: pytest-dev#515
Ref: pytest-dev/pytest#6988
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.

INTERNALERROR> TypeError: unhashable type: 'ExceptionChainRepr' pytest fails to run with pytest-xdist
4 participants