-
Notifications
You must be signed in to change notification settings - Fork 2.5k
Description
In Python's typing object and Any are in many ways similar, but there are subtle differences making one better than the other in certain context. We added an explicit converter that does nothing for Any in RF 6.1 and the reasons explained in #4647 apply also to object. In addition to that, the current situation is inconsistent.
A comment in the aforementioned issues explains why adding a converter for a currently unrecognized type is backwards-incompatible. In practice the behavior changes so that if you have
def example(arg: object = 1):
...there's no conversion attempted based on the default value type anymore. This kind of typing ought to be rare and the problem is easy to avoid by using arg: int | object = 1 instead. I thus consider the change fine also in a non-major release.