Skip to content

fix support for obj parameter of Class.from_parent #7063

Open

Description

@RonnyPfannschmidt

in c99c7d0#r38397315 @blueyed noted a ignored optional parameter

as far as i remember this is a refactoring artifact i accidentally left,
i should ensure it can be used

Activity

  1. blueyed commented on Apr 9, 2020

    @blueyed
    Contributor

    Class never took an obj.
    I've noticed this when optimizing things to use passed-in objects.

  2. RonnyPfannschmidt commented on Apr 9, 2020

    @RonnyPfannschmidt
    MemberAuthor

    @blueyed as i said its a refactoring artifact i accidentally left

    it will be revisited as pretty much everything should try to use passed in objects

  3. blueyed commented on Apr 9, 2020

    @blueyed
    Contributor

    it will be revisited as pretty much everything should try to use passed in objects

    Yeah. I've came across this when noticing that typically both FunctionDefinition and Function are being created - both creating the obj etc.

    As for your "please coordinate" comment on #7052 you might want to provide some reference to why FunctionDefinition is needed / what's the plan with it.

  4. RonnyPfannschmidt commented on Apr 10, 2020

    @RonnyPfannschmidt
    MemberAuthor

    Functiondefinition is the node which represents a function without parameterization, its collect method should run generate_tests

  5. blueyed commented on Apr 10, 2020

    @blueyed
    Contributor

    i should ensure it can be used

    Will it be named obj then still? Function uses callobj for it currently/already.

  6. RonnyPfannschmidt commented on Apr 10, 2020

    @RonnyPfannschmidt
    MemberAuthor

    yes, , obj is the intenral/semantical name used in practically all nodes, the function object using callobj will deprecate/disappear with the introduction of functiondefinition in the collection tree

  7. added a commit that references this issue on Aug 28, 2020
  8. LuanaPBueno commented on Oct 22, 2026

    @LuanaPBueno
    Contributor

    Opened pytest-dev/pytest#15247 for this.

  9. added a commit that references this issue on Oct 23, 2026
    a64d4ab
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions