Replace deprecated collections.Iterable with collections.abc.Iterable#19329
Merged
wangxin merged 1 commit intosonic-net:masterfrom Jul 3, 2025
Merged
Conversation
Collaborator
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
wangxin
approved these changes
Jul 3, 2025
lolyu
reviewed
Jul 3, 2025
Collaborator
lolyu
left a comment
There was a problem hiding this comment.
LGTM, thanks for the fix.
mssonicbld
pushed a commit
to mssonicbld/sonic-mgmt
that referenced
this pull request
Jul 3, 2025
…#19329) What is the motivation for this PR? Starting with Python 3.3, collections.Iterable was deprecated in favor of collections.abc.Iterable, though it remained temporarily supported for backward compatibility. However, as of Python 3.10, the old reference has been officially removed. Doc image Since we are upgrading Python from 3.8 to 3.12—where collections.Iterable is no longer supported—we will update all such references to use collections.abc.Iterable to ensure compatibility and prevent runtime errors. How did you do it? We will update all such references to use collections.abc.Iterable to ensure compatibility and prevent runtime errors. How did you verify/test it? We need to make sure that this change won't affect current test firstly -- test by pipeline itself. And then, we need to make sure that this change works in the new version -- test locally.
11 tasks
Collaborator
|
Cherry-pick PR to 202505: #19388 |
Merged
11 tasks
Collaborator
|
Cherry-pick PR to msft-202405: Azure/sonic-mgmt.msft#492 |
mssonicbld
pushed a commit
that referenced
this pull request
Jul 3, 2025
What is the motivation for this PR? Starting with Python 3.3, collections.Iterable was deprecated in favor of collections.abc.Iterable, though it remained temporarily supported for backward compatibility. However, as of Python 3.10, the old reference has been officially removed. Doc image Since we are upgrading Python from 3.8 to 3.12—where collections.Iterable is no longer supported—we will update all such references to use collections.abc.Iterable to ensure compatibility and prevent runtime errors. How did you do it? We will update all such references to use collections.abc.Iterable to ensure compatibility and prevent runtime errors. How did you verify/test it? We need to make sure that this change won't affect current test firstly -- test by pipeline itself. And then, we need to make sure that this change works in the new version -- test locally.
11 tasks
Collaborator
|
Cherry-pick PR to msft-202412: Azure/sonic-mgmt.msft#500 |
nissampa
pushed a commit
to nissampa/sonic-mgmt_dpu_test
that referenced
this pull request
Aug 7, 2025
…#19329) What is the motivation for this PR? Starting with Python 3.3, collections.Iterable was deprecated in favor of collections.abc.Iterable, though it remained temporarily supported for backward compatibility. However, as of Python 3.10, the old reference has been officially removed. Doc image Since we are upgrading Python from 3.8 to 3.12—where collections.Iterable is no longer supported—we will update all such references to use collections.abc.Iterable to ensure compatibility and prevent runtime errors. How did you do it? We will update all such references to use collections.abc.Iterable to ensure compatibility and prevent runtime errors. How did you verify/test it? We need to make sure that this change won't affect current test firstly -- test by pipeline itself. And then, we need to make sure that this change works in the new version -- test locally.
ashutosh-agrawal
pushed a commit
to ashutosh-agrawal/sonic-mgmt
that referenced
this pull request
Aug 14, 2025
…#19329) What is the motivation for this PR? Starting with Python 3.3, collections.Iterable was deprecated in favor of collections.abc.Iterable, though it remained temporarily supported for backward compatibility. However, as of Python 3.10, the old reference has been officially removed. Doc image Since we are upgrading Python from 3.8 to 3.12—where collections.Iterable is no longer supported—we will update all such references to use collections.abc.Iterable to ensure compatibility and prevent runtime errors. How did you do it? We will update all such references to use collections.abc.Iterable to ensure compatibility and prevent runtime errors. How did you verify/test it? We need to make sure that this change won't affect current test firstly -- test by pipeline itself. And then, we need to make sure that this change works in the new version -- test locally.
vidyac86
pushed a commit
to vidyac86/sonic-mgmt
that referenced
this pull request
Oct 23, 2025
…#19329) What is the motivation for this PR? Starting with Python 3.3, collections.Iterable was deprecated in favor of collections.abc.Iterable, though it remained temporarily supported for backward compatibility. However, as of Python 3.10, the old reference has been officially removed. Doc image Since we are upgrading Python from 3.8 to 3.12—where collections.Iterable is no longer supported—we will update all such references to use collections.abc.Iterable to ensure compatibility and prevent runtime errors. How did you do it? We will update all such references to use collections.abc.Iterable to ensure compatibility and prevent runtime errors. How did you verify/test it? We need to make sure that this change won't affect current test firstly -- test by pipeline itself. And then, we need to make sure that this change works in the new version -- test locally.
opcoder0
pushed a commit
to opcoder0/sonic-mgmt
that referenced
this pull request
Dec 8, 2025
…#19329) What is the motivation for this PR? Starting with Python 3.3, collections.Iterable was deprecated in favor of collections.abc.Iterable, though it remained temporarily supported for backward compatibility. However, as of Python 3.10, the old reference has been officially removed. Doc image Since we are upgrading Python from 3.8 to 3.12—where collections.Iterable is no longer supported—we will update all such references to use collections.abc.Iterable to ensure compatibility and prevent runtime errors. How did you do it? We will update all such references to use collections.abc.Iterable to ensure compatibility and prevent runtime errors. How did you verify/test it? We need to make sure that this change won't affect current test firstly -- test by pipeline itself. And then, we need to make sure that this change works in the new version -- test locally. Signed-off-by: opcoder0 <[email protected]>
gshemesh2
pushed a commit
to gshemesh2/sonic-mgmt
that referenced
this pull request
Dec 16, 2025
…#19329) What is the motivation for this PR? Starting with Python 3.3, collections.Iterable was deprecated in favor of collections.abc.Iterable, though it remained temporarily supported for backward compatibility. However, as of Python 3.10, the old reference has been officially removed. Doc image Since we are upgrading Python from 3.8 to 3.12—where collections.Iterable is no longer supported—we will update all such references to use collections.abc.Iterable to ensure compatibility and prevent runtime errors. How did you do it? We will update all such references to use collections.abc.Iterable to ensure compatibility and prevent runtime errors. How did you verify/test it? We need to make sure that this change won't affect current test firstly -- test by pipeline itself. And then, we need to make sure that this change works in the new version -- test locally. Signed-off-by: Guy Shemesh <[email protected]>
AharonMalkin
pushed a commit
to AharonMalkin/sonic-mgmt
that referenced
this pull request
Dec 16, 2025
…#19329) What is the motivation for this PR? Starting with Python 3.3, collections.Iterable was deprecated in favor of collections.abc.Iterable, though it remained temporarily supported for backward compatibility. However, as of Python 3.10, the old reference has been officially removed. Doc image Since we are upgrading Python from 3.8 to 3.12—where collections.Iterable is no longer supported—we will update all such references to use collections.abc.Iterable to ensure compatibility and prevent runtime errors. How did you do it? We will update all such references to use collections.abc.Iterable to ensure compatibility and prevent runtime errors. How did you verify/test it? We need to make sure that this change won't affect current test firstly -- test by pipeline itself. And then, we need to make sure that this change works in the new version -- test locally. Signed-off-by: Aharon Malkin <[email protected]>
gshemesh2
pushed a commit
to gshemesh2/sonic-mgmt
that referenced
this pull request
Dec 21, 2025
…#19329) What is the motivation for this PR? Starting with Python 3.3, collections.Iterable was deprecated in favor of collections.abc.Iterable, though it remained temporarily supported for backward compatibility. However, as of Python 3.10, the old reference has been officially removed. Doc image Since we are upgrading Python from 3.8 to 3.12—where collections.Iterable is no longer supported—we will update all such references to use collections.abc.Iterable to ensure compatibility and prevent runtime errors. How did you do it? We will update all such references to use collections.abc.Iterable to ensure compatibility and prevent runtime errors. How did you verify/test it? We need to make sure that this change won't affect current test firstly -- test by pipeline itself. And then, we need to make sure that this change works in the new version -- test locally. Signed-off-by: Guy Shemesh <[email protected]>
venu-nexthop
pushed a commit
to venu-nexthop/sonic-mgmt
that referenced
this pull request
Jan 13, 2026
…#19329) What is the motivation for this PR? Starting with Python 3.3, collections.Iterable was deprecated in favor of collections.abc.Iterable, though it remained temporarily supported for backward compatibility. However, as of Python 3.10, the old reference has been officially removed. Doc image Since we are upgrading Python from 3.8 to 3.12—where collections.Iterable is no longer supported—we will update all such references to use collections.abc.Iterable to ensure compatibility and prevent runtime errors. How did you do it? We will update all such references to use collections.abc.Iterable to ensure compatibility and prevent runtime errors. How did you verify/test it? We need to make sure that this change won't affect current test firstly -- test by pipeline itself. And then, we need to make sure that this change works in the new version -- test locally.
gshemesh2
pushed a commit
to gshemesh2/sonic-mgmt
that referenced
this pull request
Jan 26, 2026
…#19329) What is the motivation for this PR? Starting with Python 3.3, collections.Iterable was deprecated in favor of collections.abc.Iterable, though it remained temporarily supported for backward compatibility. However, as of Python 3.10, the old reference has been officially removed. Doc image Since we are upgrading Python from 3.8 to 3.12—where collections.Iterable is no longer supported—we will update all such references to use collections.abc.Iterable to ensure compatibility and prevent runtime errors. How did you do it? We will update all such references to use collections.abc.Iterable to ensure compatibility and prevent runtime errors. How did you verify/test it? We need to make sure that this change won't affect current test firstly -- test by pipeline itself. And then, we need to make sure that this change works in the new version -- test locally. Signed-off-by: Guy Shemesh <[email protected]>
ytzur1
pushed a commit
to ytzur1/sonic-mgmt
that referenced
this pull request
Feb 2, 2026
…#19329) What is the motivation for this PR? Starting with Python 3.3, collections.Iterable was deprecated in favor of collections.abc.Iterable, though it remained temporarily supported for backward compatibility. However, as of Python 3.10, the old reference has been officially removed. Doc image Since we are upgrading Python from 3.8 to 3.12—where collections.Iterable is no longer supported—we will update all such references to use collections.abc.Iterable to ensure compatibility and prevent runtime errors. How did you do it? We will update all such references to use collections.abc.Iterable to ensure compatibility and prevent runtime errors. How did you verify/test it? We need to make sure that this change won't affect current test firstly -- test by pipeline itself. And then, we need to make sure that this change works in the new version -- test locally. Signed-off-by: Yael Tzur <[email protected]>
auspham
pushed a commit
to auspham/sonic-mgmt
that referenced
this pull request
Feb 3, 2026
…#19329) What is the motivation for this PR? Starting with Python 3.3, collections.Iterable was deprecated in favor of collections.abc.Iterable, though it remained temporarily supported for backward compatibility. However, as of Python 3.10, the old reference has been officially removed. Doc image Since we are upgrading Python from 3.8 to 3.12—where collections.Iterable is no longer supported—we will update all such references to use collections.abc.Iterable to ensure compatibility and prevent runtime errors. How did you do it? We will update all such references to use collections.abc.Iterable to ensure compatibility and prevent runtime errors. How did you verify/test it? We need to make sure that this change won't affect current test firstly -- test by pipeline itself. And then, we need to make sure that this change works in the new version -- test locally.
auspham
pushed a commit
to auspham/sonic-mgmt
that referenced
this pull request
Feb 3, 2026
…le (sonic-net#19329) (sonic-net#502) Cherry sonic-net#19329 What is the motivation for this PR? Starting with Python 3.3, collections.Iterable was deprecated in favor of collections.abc.Iterable, though it remained temporarily supported for backward compatibility. However, as of Python 3.10, the old reference has been officially removed. Doc image Since we are upgrading Python from 3.8 to 3.12—where collections.Iterable is no longer supported—we will update all such references to use collections.abc.Iterable to ensure compatibility and prevent runtime errors. How did you do it? We will update all such references to use collections.abc.Iterable to ensure compatibility and prevent runtime errors. How did you verify/test it? We need to make sure that this change won't affect current test firstly -- test by pipeline itself. And then, we need to make sure that this change works in the new version -- test locally.
venu-nexthop
pushed a commit
to venu-nexthop/sonic-mgmt
that referenced
this pull request
Mar 27, 2026
…#19329) What is the motivation for this PR? Starting with Python 3.3, collections.Iterable was deprecated in favor of collections.abc.Iterable, though it remained temporarily supported for backward compatibility. However, as of Python 3.10, the old reference has been officially removed. Doc image Since we are upgrading Python from 3.8 to 3.12—where collections.Iterable is no longer supported—we will update all such references to use collections.abc.Iterable to ensure compatibility and prevent runtime errors. How did you do it? We will update all such references to use collections.abc.Iterable to ensure compatibility and prevent runtime errors. How did you verify/test it? We need to make sure that this change won't affect current test firstly -- test by pipeline itself. And then, we need to make sure that this change works in the new version -- test locally.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description of PR
Starting with Python 3.3,

collections.Iterablewas deprecated in favor ofcollections.abc.Iterable, though it remained temporarily supported for backward compatibility. However, as of Python 3.10, the old reference has been officially removed. DocSince we are upgrading Python from 3.8 to 3.12—where
collections.Iterableis no longer supported—we will update all such references to usecollections.abc.Iterableto ensure compatibility and prevent runtime errors.Summary:
Fixes # (issue)
Type of change
Back port request
Approach
What is the motivation for this PR?
Starting with Python 3.3,

collections.Iterablewas deprecated in favor ofcollections.abc.Iterable, though it remained temporarily supported for backward compatibility. However, as of Python 3.10, the old reference has been officially removed. DocSince we are upgrading Python from 3.8 to 3.12—where
collections.Iterableis no longer supported—we will update all such references to usecollections.abc.Iterableto ensure compatibility and prevent runtime errors.How did you do it?
We will update all such references to use
collections.abc.Iterableto ensure compatibility and prevent runtime errors.How did you verify/test it?
We need to make sure that this change won't affect current test firstly -- test by pipeline itself. And then, we need to make sure that this change works in the new version -- test locally.
Any platform specific information?
Supported testbed topology if it's a new test case?
Documentation