@@ -441,21 +441,18 @@ def experimental_feature():
441441 skip_old = False
442442 skip_new = False
443443
444- # Debug: Check if this is a DistributedDataParallel change
445- if old_path and 'DistributedDataParallel' in old_path and len (breaking_changes ) < 5 :
446- print (f"\n 🔍 DEBUG: Breaking change path: { old_path } " , file = sys .stderr )
447- print (f" Checking against { len (all_filtered )} filtered paths" , file = sys .stderr )
448- matching = [f for f in all_filtered if 'DistributedDataParallel' in f ]
449- if matching :
450- print (f" Found filtered paths with DistributedDataParallel: { matching [:3 ]} " , file = sys .stderr )
451-
452444 if old_path :
453445 # Check exact match or if it's a child (e.g., MyClass.__init__)
446+ # Also check if ANY filtered path is a prefix (handles alias vs full path mismatches)
454447 if old_path in all_filtered :
455448 skip_old = True
456449 else :
450+ # Check if old_path starts with any filtered path
451+ # This handles cases where filtered has "a.b.C" but change has "a.b.c.C.__init__"
457452 for filtered_path in all_filtered :
458- if old_path .startswith (filtered_path + '.' ):
453+ # Match if old_path starts with filtered_path followed by . or (
454+ if (old_path .startswith (filtered_path + '.' ) or
455+ old_path .startswith (filtered_path + '(' )):
459456 skip_old = True
460457 break
461458
@@ -464,8 +461,11 @@ def experimental_feature():
464461 if new_path in all_filtered :
465462 skip_new = True
466463 else :
464+ # Check if new_path starts with any filtered path
467465 for filtered_path in all_filtered :
468- if new_path .startswith (filtered_path + '.' ):
466+ # Match if new_path starts with filtered_path followed by . or (
467+ if (new_path .startswith (filtered_path + '.' ) or
468+ new_path .startswith (filtered_path + '(' )):
469469 skip_new = True
470470 break
471471
0 commit comments