IronLanguages / IronLanguages/ironpython3

object.__init__() takes no parameters in test_inheritance

Open
#1,413 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

testing
Dominant language
C#
Stars
2.8k
Forks
316
Avg merge
1d 9h
Merged PRs (30d)
1

Description

In IronPython.test_inheritance there are tests which are similar to:

import System

class test(System.Collections.Generic.List[System.Int32]):
    def __init__(self):
        super().__init__(1)

test()

which fail with:

TypeError: object.__init__() takes no parameters

These tests worked with IronPython 2 and raised a DeprecationWarning. I'm not entirely sure what the purpose of having the super().__init__ calls on a .NET class (which doesn't define __init__). I think having it throw TypeError is correct and the tests should be fixed.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by locating the failing tests in IronPython.test_inheritance and inspect the cases that call super().init() on a .NET class. Run the relevant inheritance tests to confirm the TypeError, then verify the updated tests pass without expecting the deprecated behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp, python
Domain
testing-qa
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.