Skip to content

[WIP] Cache TerminalRepr.__str__#219

Closed
blueyed wants to merge 3 commits into
my-masterfrom
TerminalRepr-cached-str
Closed

[WIP] Cache TerminalRepr.__str__#219
blueyed wants to merge 3 commits into
my-masterfrom
TerminalRepr-cached-str

Conversation

@blueyed

@blueyed blueyed commented Feb 13, 2020

Copy link
Copy Markdown
Owner

attrs part upstreamed: pytest-dev#6732

TODO:

  • was crashing xdist there, needs the fix from there.

@blueyed blueyed changed the title Make TerminalRepr.__str__ a cached property Cache TerminalRepr.__str__ Feb 13, 2020
@blueyed blueyed changed the title Cache TerminalRepr.__str__ [WIP] Cache TerminalRepr.__str__ Feb 13, 2020
…t-dev#6732)

* Turn ReprTraceback into attrs class

* Use attr.asdict with serialize_repr_{crash,traceback}

* Turn ReprFileLocation into attrs class, convert py.path.local

(cherry picked from commit 9631b3c)
@blueyed blueyed force-pushed the TerminalRepr-cached-str branch from bd7099a to dfdd2b9 Compare February 15, 2020 00:46
TODO: add test / attrs's frozen
@blueyed

blueyed commented Feb 18, 2020

Copy link
Copy Markdown
Owner Author

Typically only accessed once, not worth it for now.

@blueyed blueyed closed this Feb 18, 2020
@blueyed blueyed deleted the TerminalRepr-cached-str branch February 18, 2020 21:37
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.

1 participant