getslash / slash

The Slash testing infrastructure
https://getslash.github.io/slash
Other
75 stars 38 forks source link

Python 3.11 Support #1067

Closed klimburg closed 1 year ago

klimburg commented 1 year ago

dessert doesn't currently support python 3.11 https://github.com/vmalloc/dessert/issues/19

Making this ticket to bump the version when that is addressed.

Additionally has any thought been put into just depending on or vendoring pytest directly, I realize it might be a bit overkill just for the AST rewrite but it might be worth it to keep up-to-date since they have many more resources to address changes in upcoming python versions.

vmalloc commented 1 year ago

Yes unfortunately I don't have enough time to maintain dessert actively. If anyone's up for trying to fix its compatibility or trying out censoring pytest - contributions are more than welcome!

vmalloc commented 1 year ago

Just to give a complete picture - I tried reaching out to Pytest devs multiple times with requests to make their assertion rewriting logic more approachable from external packages, including suggestions to move just the assertion logic to a separate package to make dessert obsolete. So far I only received negative replies, saying they are not interested in taking that path

klimburg commented 1 year ago

Thats unfortunate. One thing I was thinking about is if instead of AST rewrites for assertions if instead there was just a slash.assert function. Obviously this would be big departure and would have backwards compatibility implications. I also can't say I've done enough digging to understand if there are other needs for the rewrite logic besides just the assert stuff.

klimburg commented 1 year ago

@vmalloc interestingly enough I was listening to the latest episode of Test & Code podcast with @asottile and the topic was what would you change about pytest and making the assert rewrites a standalone library came up so perhaps they would be more interested these days?

vmalloc commented 1 year ago

That's an option. Care to contact the authors? Unfortunately these days I have very little time to pursue this direction...

Another option suggested by @ayalash is to temporarily suspend the assertion rewriting feature under 3.11 to enable running with it until that conundrum is resolved...

uartie commented 1 year ago

@klimburg @vmalloc @ayalash this seems to be fixed for me in dessert 1.4.7.

klimburg commented 1 year ago

Awesome! I'll test it out (and maybe py3.12 while I'm at it).

klimburg commented 1 year ago

yes this seems to be fixed