IronLanguages / IronLanguages/ironpython3
object.__init__() takes no parameters in test_inheritance
Nobody has claimed this yet.
- 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
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- 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