-
-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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
[RFC] split up _pytest.python #10996
base: main
Are you sure you want to change the base?
[RFC] split up _pytest.python #10996
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I definitely like the idea. 👍
@@ -116,7 +115,6 @@ | |||
"Mark", | |||
"MarkDecorator", | |||
"MarkGenerator", | |||
"Metafunc", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this intentional? If so this should count as a breaking change, I think.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good catch, refactoring tool mistake
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
With this refactoring, python.nodes
imports from python.metafunc
and vice-versa. To me this means that neither module can be understood in isolation. I am -0.5 on splitting in this state, as it doesn't really help IMO.
From my experience with pytest code all of the core is intertwined so it might be hard to pull off, but it's a good goal :)
Part of my goal here is to get to a state where the interdependency is more clearly painful so that detangle in small steps gets attainable Sometime in the future I want most collection code in nodes, and functions split such that Only function definition will import from meta func |
this tries to split up _pytest.python by topic
the module is quite large and that makes it a pain to refactor certain details
i want to trim bits down so its more easy to eventually turn
FunctionDefinition
from a gruesome hack into a part of the collection treethe initial split is not per se targeting good locations or complete
but its a discussion starter and i intend to change details until we hit a nice split that separates code in a manageable way